From ad647d2e0aad05e979315899a4a4ac6d9b1d6158 Mon Sep 17 00:00:00 2001 From: Ilya Tumaykin Date: Mon, 21 Mar 2016 21:45:47 +0300 Subject: [PATCH] cmake: keep compiler definitions in one place --- src/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6be76f..1678a1e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,13 @@ add_definitions( -Wall ) +if (CMAKE_BUILD_TYPE MATCHES Debug) + add_definitions( + -O0 + -g3 + ) +endif (CMAKE_BUILD_TYPE MATCHES Debug) + add_library( ${UCHARDET_LIBRARY} ${UCHARDET_SOURCES} @@ -91,13 +98,6 @@ if (UCHARDET_STATIC_LIBRARY) ) endif (UCHARDET_STATIC_LIBRARY) -if (CMAKE_BUILD_TYPE MATCHES Debug) - add_definitions( - -O0 - -g3 - ) -endif (CMAKE_BUILD_TYPE MATCHES Debug) - if (NOT WIN32) install( TARGETS