Code

replace setting flags as variables with use of add_definitions() to avoid quoting...
authoracspike <acspike@users.sourceforge.net>
Thu, 10 Apr 2008 01:09:31 +0000 (01:09 +0000)
committeracspike <acspike@users.sourceforge.net>
Thu, 10 Apr 2008 01:09:31 +0000 (01:09 +0000)
CMakeScripts/ConfigCompileFlags.cmake

index 0d88be71eed7bccff6808109a7eb10305f221a7c..679af6c92e3568da1bf00560c1debeac3949cc49 100644 (file)
@@ -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} ")