diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-23 11:37:53 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-23 13:20:22 +0200 |
commit | e28c988a04c15c2cedfe7e069a066463f4e4c452 (patch) | |
tree | 7eda372353b8d309380ebe1f524e2a136bd818a1 /compat | |
parent | 163c717dec73df7a907821cfb092a2ab6c62286a (diff) |
cmake: refactor boilerplate for projects
Don't rely on a macro that shouldn't be necessary.
The information "opentrack_boilerplate" retrieves is now factored out to
be easily available to projects themselves.
opentrack_boilerplate can now also build executables.
When appropriate, target properties are now concatenated rather than
replaced.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt index 2bbb496c..7404bdfb 100644 --- a/compat/CMakeLists.txt +++ b/compat/CMakeLists.txt @@ -1,8 +1,9 @@ opentrack_boilerplate(opentrack-compat NO-COMPAT BIN) + if(NOT WIN32 AND NOT APPLE) target_link_libraries(opentrack-compat rt) endif() + if(CMAKE_COMPILER_IS_GNUCXX) - set_source_files_properties(nan.cpp PROPERTIES - COMPILE_FLAGS "-fno-fast-math -fno-finite-math-only -O0") + set_property(SOURCE nan.cpp APPEND_STRING PROPERTY COMPILE_FLAGS "-fno-lto -fno-fast-math -fno-finite-math-only -O0") endif() |