summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 19:43:04 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-01-19 19:43:04 +0100
commit5cefc7f9665eb3fbe5aa4b1cef581e2414aa0de2 (patch)
tree8aa06585323e7c94d6fc37af3313e73ad1f0fa0b /src
parenta07cff30b4307b51911ce0ed4be15a0ce0b3a157 (diff)
cmake: inherit compiler flags
Add _XOPEN_SOURCE=600forthe right definition of strerror_r.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8d09b16..d0e1800 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -22,11 +22,8 @@ ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "CMAKE_CONFIGURATION_TYPES=${CMAKE_CONFIGURATION_TYPES}")
-set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")
-#set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
-#set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
-#set(CMAKE_C_FLAGS_RELEASE "-O2")
-set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG=1")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG=1")
IF(MSVC)
IF(NOT DEP_ROOT)
@@ -41,12 +38,12 @@ IF(MSVC)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -fms-extensions -std=c++0x -Wall")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
- SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wextra -Wall")
- set(CMAKE_C_FLAGS_DEBUG "-g3 -ggdb3")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -fms-extensions -std=c++0x -Wall -D_XOPEN_SOURCE=600")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")
+ SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3 -ggdb3")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wextra -Wall")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -ggdb3")
IF(USE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")