Move -Wl flags to linker flags
authorNikolai Merinov <n.merinov@samsung.com>
Fri, 8 Feb 2019 12:23:23 +0000 (15:23 +0300)
committerNikolai Merinov <n.merinov@samsung.com>
Fri, 8 Feb 2019 12:23:23 +0000 (15:23 +0300)
CMakeLists.txt

index b1c3c70c089a64019dd5567de17e2f3bd5ea5552..6ded147f97121afed3219efd33d90c768ad2e6f1 100755 (executable)
@@ -37,7 +37,8 @@ else()
        SET(CXX_STD "c++11")
 endif()
 
-SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive")
+SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall")
+LINK_LIBRARIES("-Wl,--as-needed -Wl,--no-whole-archive")
 SET(CMAKE_C_FLAGS_PROFILING    "${COMPILE_BASE_FLAGS} -O0 -pg")
 SET(CMAKE_CXX_FLAGS_PROFILING  "${COMPILE_BASE_FLAGS} -O0 -pg -std=${CXX_STD} -fno-rtti")
 SET(CMAKE_C_FLAGS_DEBUG                "${COMPILE_BASE_FLAGS} -O0 -ggdb")