summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 120b5de..79e813e 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -120,7 +120,14 @@ SET_PROPERTY(DIRECTORY
if(KWSYS_CXX_STANDARD)
set(CMAKE_CXX_STANDARD "${KWSYS_CXX_STANDARD}")
elseif(NOT DEFINED CMAKE_CXX_STANDARD AND NOT DEFINED KWSYS_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 11)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
+ AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"
+ AND "x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU"
+ )
+ set(CMAKE_CXX_STANDARD 14)
+ else()
+ set(CMAKE_CXX_STANDARD 11)
+ endif()
endif()
# Select library components.
@@ -1005,7 +1012,8 @@ ENDIF()
ADD_DEFINITIONS("-DKWSYS_NAMESPACE=${KWSYS_NAMESPACE}")
# Disable deprecation warnings for standard C functions.
-IF(MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "Intel"))
+IF(MSVC OR (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "Intel" OR
+ (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"))))
ADD_DEFINITIONS(
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE