From dc05f03f0c7cf7595e2d72e280fdd3b305d51934 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Mon, 31 Mar 2008 19:39:16 +0000 Subject: [PATCH] add specific location for compiler flags; like optimization, define, debug and warning flags --- CMakeLists.txt | 4 ++-- CMakeScripts/ConfigCompileFlags.cmake | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 CMakeScripts/ConfigCompileFlags.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 65cc2d4ac..5bb826bcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,10 +6,10 @@ SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) SET(CMAKE_SKIP_RPATH:BOOL OFF) SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts) +INCLUDE(ConfigCompileFlags) INCLUDE(ConfigInkscapeDepends) -SET(CONFIG_H -"${CMAKE_CURRENT_BINARY_DIR}/config.h") +SET(CONFIG_H "${CMAKE_CURRENT_BINARY_DIR}/config.h") INCLUDE_DIRECTORIES (src/) LINK_DIRECTORIES (src/) diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake new file mode 100644 index 000000000..ed9783c4a --- /dev/null +++ b/CMakeScripts/ConfigCompileFlags.cmake @@ -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") + -- 2.30.2