File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
28
28
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native" )
29
29
endif ()
30
30
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g -Wunused-parameter -Wextra -Wreorder" )
31
- CHECK_CXX_COMPILER_FLAG ("-std=c++14" HAS_CPP14_FLAG )
32
31
33
- if (HAS_CPP14_FLAG )
34
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14" )
35
- else ()
36
- message (FATAL_ERROR "Unsupported compiler -- xtensor requires C++14 support!" )
32
+ if (NOT "${CMAKE_CXX_SIMULATE_ID} " STREQUAL "MSVC" )
33
+ CHECK_CXX_COMPILER_FLAG ("-std=c++14" HAS_CPP14_FLAG )
34
+ if (HAS_CPP14_FLAG )
35
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14" )
36
+ else ()
37
+ message (FATAL_ERROR "Unsupported compiler -- xtensor requires C++14 support!" )
38
+ endif ()
37
39
endif ()
38
40
39
41
# Enable link time optimization and set the default symbol
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
111
111
endif ()
112
112
else () # We are using clang-cl
113
113
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} /bigobj" )
114
- set (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO )
114
+ set (CMAKE_EXE_LINKER_FLAGS " ${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO" )
115
115
add_definitions (-D_CRT_SECURE_NO_WARNINGS )
116
116
add_definitions (-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING )
117
117
if (XTENSOR_DISABLE_EXCEPTIONS )
You can’t perform that action at this time.
0 commit comments