From: acspike Date: Thu, 10 Apr 2008 01:09:31 +0000 (+0000) Subject: replace setting flags as variables with use of add_definitions() to avoid quoting... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f433fedeef298518b7bc8c5cc3200d5e2adb540;p=inkscape.git replace setting flags as variables with use of add_definitions() to avoid quoting issues and because it looks like the proper cmake way --- diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake index 0d88be71e..679af6c92 100644 --- a/CMakeScripts/ConfigCompileFlags.cmake +++ b/CMakeScripts/ConfigCompileFlags.cmake @@ -1,6 +1,6 @@ SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") -SET(COMPILE_WARNING_FLAGS "-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch") -SET(COMPILE_OPTIMIZATION_FLAGS "-O2") +ADD_DEFINITIONS(-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch) +ADD_DEFINITIONS(-O2) #define the flags for profiling if desired: IF (ENABLE_PROFILING) @@ -9,20 +9,18 @@ IF (ENABLE_PROFILING) ENDIF (ENABLE_PROFILING) -SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DVERSION=\\\"${INKSCAPE_VERSION}\\\"") -SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE ") +ADD_DEFINITIONS(-DVERSION=\\\"${INKSCAPE_VERSION}\\\") +ADD_DEFINITIONS(${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE) IF (WIN32) - SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DXP_WIN") -ELSE(WIN32) -# SET(DEFINE_FLAGS "${DEFINE_FLAGS} ") + ADD_DEFINITIONS(-DXP_WIN) ENDIF (WIN32) # for Inkboard: -SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DHAVE_SSL -DRELAYTOOL_SSL=\"static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }\" ") +ADD_DEFINITIONS(-DHAVE_SSL "-DRELAYTOOL_SSL=\"static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }\"") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_WARNING_FLAGS} ${COMPILE_OPTIMIZATION_FLAGS} ${DEFINE_FLAGS} ${COMPILE_PROFILING_FLAGS} ") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_WARNING_FLAGS} ${COMPILE_OPTIMIZATION_FLAGS} ${DEFINE_FLAGS} ${COMPILE_PROFILING_FLAGS} ") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ") SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ")