summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
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()