summaryrefslogtreecommitdiffhomepage
path: root/compat/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-07-05 10:17:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-07-05 10:24:19 +0200
commitddad328eca747306e594b74db9118085021b20b2 (patch)
tree552b9b7f018ca22b3aeddf82e76e1fb1cea8b01b /compat/CMakeLists.txt
parentb1b666a210aa8947cf2ad760160538af951922a1 (diff)
cmake: use `add_compile_options'
Diffstat (limited to 'compat/CMakeLists.txt')
-rw-r--r--compat/CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt
index 5ef9ab67..fb498fb6 100644
--- a/compat/CMakeLists.txt
+++ b/compat/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(CMAKE_COMPILER_IS_GNUCXX)
+ add_compile_options(-fno-lto -fno-fast-math -fno-finite-math-only -O0)
+endif()
+
otr_module(compat NO-COMPAT BIN)
if(NOT WIN32 AND NOT APPLE)
@@ -7,8 +11,3 @@ endif()
if(WIN32)
target_link_libraries(${self} strmiids)
endif()
-
-if(CMAKE_COMPILER_IS_GNUCXX)
- set_property(SOURCE nan.cpp APPEND_STRING PROPERTY
- COMPILE_FLAGS "-fno-lto -fno-fast-math -fno-finite-math-only -O0 ")
-endif()