Code

add specific location for compiler flags; like optimization, define, debug and warnin...
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 31 Mar 2008 19:39:16 +0000 (19:39 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 31 Mar 2008 19:39:16 +0000 (19:39 +0000)
CMakeLists.txt
CMakeScripts/ConfigCompileFlags.cmake [new file with mode: 0644]

index 65cc2d4ac2844ef50b4769be54569335761ebbf1..5bb826bccc102e1c0d05570d987de1ef51accc10 100644 (file)
@@ -6,10 +6,10 @@ SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)\r
 SET(CMAKE_SKIP_RPATH:BOOL OFF)\r
 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts)\r
+INCLUDE(ConfigCompileFlags)\r
 INCLUDE(ConfigInkscapeDepends)\r
 
-SET(CONFIG_H
-"${CMAKE_CURRENT_BINARY_DIR}/config.h")\r
+SET(CONFIG_H "${CMAKE_CURRENT_BINARY_DIR}/config.h")\r
 INCLUDE_DIRECTORIES (src/)\r
 LINK_DIRECTORIES (src/)\r
 \r
diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake
new file mode 100644 (file)
index 0000000..ed9783c
--- /dev/null
@@ -0,0 +1,7 @@
+SET(COMPILE_WARNING_FLAGS "-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch")
+SET(COMPILE_OPTIMIZATION_FLAGS "-O2")
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_WARNING_FLAGS} ${COMPILE_OPTIMIZATION_FLAGS} -DVERSION=\\\"${INKSCAPE_VERSION}\\\" ")
+
+SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")
+