diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-08-01 14:56:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-08-01 14:56:04 +0200 |
commit | b88b8404526a2c0fd2d0efcebf19f2087bcf3c05 (patch) | |
tree | 53dcc0d136a7260cc01c1c30337511bebe0cab5e | |
parent | 03236ba81d6c85a26695968e5e4e266a18991362 (diff) |
cmake: add compile flags for gcc/clang
-rw-r--r-- | cmake/opentrack-platform.cmake | 5 |
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() |