diff Resources/CMake/Compiler.cmake @ 517:b2b56b4e33b0

simplifications to cmake
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Aug 2013 14:47:03 +0200
parents 5bb96a6100c0
children ded40a9e8cc8
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake	Mon Aug 19 13:40:36 2013 +0200
+++ b/Resources/CMake/Compiler.cmake	Mon Aug 19 14:47:03 2013 +0200
@@ -29,28 +29,6 @@
 
 
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-  if (DEBIAN_FORCE_HARDENING)
-    execute_process(
-      COMMAND dpkg-buildflags --get CPPFLAGS 
-      OUTPUT_VARIABLE DEBIAN_CPP_FLAGS
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process(
-      COMMAND dpkg-buildflags --get CFLAGS 
-      OUTPUT_VARIABLE DEBIAN_C_FLAGS
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process(
-      COMMAND dpkg-buildflags --get CXXFLAGS 
-      OUTPUT_VARIABLE DEBIAN_CXX_FLAGS
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process(
-      COMMAND dpkg-buildflags --get LDFLAGS 
-      OUTPUT_VARIABLE DEBIAN_LD_FLAGS
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DEBIAN_C_FLAGS} ${DEBIAN_CPP_FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DEBIAN_CXX_FLAGS} ${DEBIAN_CPP_FLAGS}")
-  endif()
-
   if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++ -I${LSB_PATH}/include -I${LSB_PATH}/include/c++ -I${LSB_PATH}/include/c++/backward -fpermissive")
   endif()
@@ -59,9 +37,9 @@
     -D_LARGEFILE64_SOURCE=1 
     -D_FILE_OFFSET_BITS=64
     )
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed ${DEBIAN_LD_FLAGS}")
-  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined ${DEBIAN_LD_FLAGS}")
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined ${DEBIAN_LD_FLAGS}")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
+  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
 
   # Remove the "-rdynamic" option
   # http://www.mail-archive.com/cmake@cmake.org/msg08837.html