forked from jasder/antlr
add note android build
This commit is contained in:
parent
30ef969e76
commit
bb516f0e91
|
@ -102,6 +102,10 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
|
|||
if (NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
|
||||
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
|
||||
endif ()
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND ANDROID)
|
||||
# Need -Os cflag and cxxflags here to work with exception handling on armeabi.
|
||||
# see https://github.com/android-ndk/ndk/issues/573
|
||||
# and without -stdlib=libc++ cxxflags
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
|
|
@ -25,7 +25,7 @@ The C++ target has been the work of the following people:
|
|||
|
||||
## Project Status
|
||||
|
||||
* Building on OS X, Windows, and Linux
|
||||
* Building on OS X, Windows, Android and Linux
|
||||
* No errors and warnings
|
||||
* Library linking
|
||||
* Some unit tests in the OSX project, for important base classes with almost 100% code coverage.
|
||||
|
@ -47,6 +47,9 @@ Simply open the VS solution (VS 2013+) and build it.
|
|||
#### Compiling on OSX
|
||||
Either open the included XCode project and build that or use the cmake compilation as described for linux.
|
||||
|
||||
#### Compiling on Android
|
||||
Try run cmake -DCMAKE_ANDROID_NDK=/folder/of/android_ndkr17_and_above -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_API=14 -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_BUILD_TYPE=Release /folder/antlr4_src_dir -G Ninja.
|
||||
|
||||
#### Compiling on Linux
|
||||
- cd <antlr4-dir>/runtime/Cpp (this is where this readme is located)
|
||||
- mkdir build && mkdir run && cd build
|
||||
|
|
Loading…
Reference in New Issue