diff options
author | Anton Adamansky <adamansky@gmail.com> | 2015-03-27 14:50:15 +0600 |
---|---|---|
committer | Anton Adamansky <adamansky@gmail.com> | 2015-03-27 14:50:15 +0600 |
commit | d9a3adb28a0b6d8d75f3b97c1896250d904f1c6c (patch) | |
tree | 47377679a7e0419e5e754f078f2ceeea6d773306 /src/CMakeLists.txt | |
parent | cedfb95087c98612f52d841cb8ce9fd4c3d194c4 (diff) | |
download | ejdb-d9a3adb28a0b6d8d75f3b97c1896250d904f1c6c.tar.gz ejdb-d9a3adb28a0b6d8d75f3b97c1896250d904f1c6c.tar.bz2 ejdb-d9a3adb28a0b6d8d75f3b97c1896250d904f1c6c.zip |
Build fixes #122 #121 (OSX)
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c215678..567e2b2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,16 +1,3 @@ -if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") - if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7) - message(FATAL_ERROR "GCC version must be at least 4.7!") - endif() -elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") - if (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) - message(FATAL_ERROR "Clang version must be at least 3.4!") - endif() -else() - message(FATAL_ERROR "You are using an unsupported compiler! EJDB has only been tested \ - with Clang >= 3.4 and GCC >= 4.7") -endif() - if(APPLE) option(BUILD_FRAMEWORK "Build an OS X framework" OFF) set(FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING "Directory to install frameworks to.") @@ -32,7 +19,6 @@ if (WIN32) include(Win32LIBTools) endif() - if (NOT CMAKE_BUILD_TYPE) message(FATAL_ERROR "Please specify the build type -DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo") endif(NOT CMAKE_BUILD_TYPE) @@ -157,7 +143,11 @@ include_directories(${EJDB_INCLUDE_DIRS}) target_link_libraries(ejdb ${EJDB_LLIBRARIES}) target_link_libraries(ejdb_p ${EJDB_LLIBRARIES}) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fsigned-char -pedantic -Wfatal-errors -fPIC") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fsigned-char -pedantic -Wfatal-errors") +if (NOT WIN32) ## todo review + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +endif(NOT WIN32) + set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Werror -DDEBUG -D_DEBUG -UNDEBUG") set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g") |