summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-10 12:45:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-10 12:45:28 +0200
commit1a4ad209341b7ef2364f7b6bc8195a4ac93838d0 (patch)
tree43f6ac1d9d6fce823c4ab850364fe8a2a1e7a1cd /cmake/opentrack-platform.cmake
parentb67d81563718bd1f773f9e586b04b285e45b1208 (diff)
cmake: don't force cache variables
Diffstat (limited to 'cmake/opentrack-platform.cmake')
-rw-r--r--cmake/opentrack-platform.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 9d5b1abe..9c1d73a7 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -41,9 +41,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if(MSVC)
- add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)
- add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0)
- add_definitions(-DHAS_EXCEPTIONS=0)
+ add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
+ add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_ITERATOR_DEBUG_LEVEL=0)
+ add_definitions(-D_HAS_EXCEPTIONS=0)
+
set(CMAKE_CXX_FLAGS "-std:c++14 ${CMAKE_CXX_FLAGS}")
if(SDK_INSTALL_DEBUG_INFO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi")
@@ -112,7 +113,6 @@ function(fix_flags lang flag replacement)
if(".${replacement}" STREQUAL ".")
set(pfx "")
endif()
- otr_escape_string(flag "${flag}")
foreach(k _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO "")
set(tmp "${CMAKE_${lang}_FLAGS${k}}")
if(NOT ".${replacement}" STREQUAL ".")
@@ -120,9 +120,9 @@ function(fix_flags lang flag 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 "" FORCE)
+ 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 "" FORCE)
+ set(CMAKE_${lang}_FLAGS${k} "${CMAKE_${lang}_FLAGS${k}} ${pfx}${replacement}" CACHE STRING "")
endif()
endforeach()
endfunction()