CMake: drop linker flag setting
CMake propagates the normal compiler flags also to the linker, one would only
need this for special linker-only flags.
@@ -55,14 +55,12 @@ endif(BUILD_tests)
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
-set(EXTRA_LINK_AND_COMPILE_FLAGS)
+set(EXTRA_COMPILE_FLAGS)
if(FLAG_NO_STRICT_ALIASING)
- set(EXTRA_LINK_AND_COMPILE_FLAGS "${EXTRA_LINK_AND_COMPILE_FLAGS} -fno-strict-aliasing")
+ set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")
endif()
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)
if(MSVC)
