Skip to content

Commit 3039217

Browse files
committed
cmake: do not check c_std_11 in MSVS 14
Fails with cmake 3.31, CUDA 8 and MSVS 14 2015 but required for later MSVS versions (VS 2015 compat macro in gpujpeg_common_internal.h just for VS<=2015, otherwise c11 _Static_assert is used and thus explicit (!) standard for MSVC needed (implicit is still C89).
1 parent 49c9cd1 commit 3039217

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
5656
# Common settings
5757
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
5858

59-
set(NEEDED_COMPILER_FEATURES c_std_11)
59+
if(NOT MSVC OR MSVC_TOOLSET_VERSION GREATER 140)
60+
list(APPEND NEEDED_COMPILER_FEATURES c_std_11)
61+
endif()
6062

6163
set(COMPILED_OPTIONS)
6264

0 commit comments

Comments
 (0)