diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-19 17:22:44 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-19 17:22:48 +0200 |
commit | ec6e34b08a768cc89bce358be5eca13d908344a1 (patch) | |
tree | 0d3d8b4752abe8e064fde24c14ac2e2ec195d8f4 /cmake | |
parent | dcb317150e34f8e5706c89d7774353ba1e8dd83e (diff) |
cmake: remove some complex code
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-platform.cmake | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index a3f12f96..9bed520c 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -116,31 +116,12 @@ if(NOT MSVC) set(CMAKE_CXX_EXTENSIONS FALSE) endif() -set_property(GLOBAL PROPERTY USE_FOLDERS OFF) +foreach(k _RELEASE _DEBUG _RELWITHDEBINFO _MINSIZEREL) + set(CMAKE_C_FLAGS${k} "${CMAKE_C_FLAGS${k}} -UNDEBUG") + set(CMAKE_CXX_FLAGS${k} "${CMAKE_CXX_FLAGS${k}} -UNDEBUG") +endforeach() -function(fix_flags lang flag replacement) - set(part "-") - set(pfx "-") - if(MSVC) - set(part "[-/]") - set(pfx "/") - endif() - if(".${replacement}" STREQUAL ".") - set(pfx "") - endif() - foreach(k _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO "") - set(tmp "${CMAKE_${lang}_FLAGS${k}}") - if(NOT ".${replacement}" STREQUAL ".") - string(APPEND replacement " ") - endif() - string(REGEX REPLACE "(^| )${part}${flag}(\$| )" " ${pfx}${replacement}" CMAKE_${lang}_FLAGS${k} "${CMAKE_${lang}_FLAGS${k}}") - if(NOT ".${tmp}" STREQUAL ".${CMAKE_${lang}_FLAGS${k}}") - set(CMAKE_${lang}_FLAGS${k} "${CMAKE_${lang}_FLAGS${k}}" CACHE STRING "") - else() - set(CMAKE_${lang}_FLAGS${k} "${CMAKE_${lang}_FLAGS${k}} ${pfx}${replacement}" CACHE STRING "") - endif() - endforeach() -endfunction() +set_property(GLOBAL PROPERTY USE_FOLDERS OFF) # nix -rdynamic passed from Linux-GNU.cmake if(CMAKE_COMPILER_IS_GNUCXX) |