]> granicus.if.org Git - libexpat/commitdiff
CMake: drop linker flag setting
authorRolf Eike Beer <eb@emlix.com>
Mon, 7 Aug 2017 08:30:21 +0000 (10:30 +0200)
committerRolf Eike Beer <eike@sf-mail.de>
Mon, 7 Aug 2017 18:16:45 +0000 (20:16 +0200)
CMake propagates the normal compiler flags also to the linker, one would only
need this for special linker-only flags.

expat/CMakeLists.txt

index de31d4584a4b5a63d37e6f7bea8371b420c87ee7..9ec332e328cbf8fff121b08f57aef69a1974e537 100644 (file)
@@ -55,14 +55,12 @@ endif(BUILD_tests)
 \r
 include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)\r
 \r
-set(EXTRA_LINK_AND_COMPILE_FLAGS)\r
+set(EXTRA_COMPILE_FLAGS)\r
 if(FLAG_NO_STRICT_ALIASING)\r
-    set(EXTRA_LINK_AND_COMPILE_FLAGS "${EXTRA_LINK_AND_COMPILE_FLAGS} -fno-strict-aliasing")\r
+    set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")\r
 endif()\r
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")\r
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")\r
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")\r
 \r
 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)\r
 if(MSVC)\r