summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:56:04 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:56:04 +0200
commitb88b8404526a2c0fd2d0efcebf19f2087bcf3c05 (patch)
tree53dcc0d136a7260cc01c1c30337511bebe0cab5e
parent03236ba81d6c85a26695968e5e4e266a18991362 (diff)
cmake: add compile flags for gcc/clang
-rw-r--r--cmake/opentrack-platform.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index dae934e1..02c1b2f8 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -98,6 +98,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
add_link_options(-Wl,--exclude-libs,ALL)
add_link_options(-Wl,-z,relro,-z,now)
add_link_options(-Wl,--as-needed)
+ add_compile_options(-fno-plt)
endif()
endif()
@@ -165,3 +166,7 @@ endif()
if(NOT MSVC)
include(FindPkgConfig)
endif()
+
+if(LINUX AND CMAKE_COMPILER_IS_CLANG)
+ link_libraries(atomic)
+endif()