aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cube/CMakeLists.txt4
-rw-r--r--vulkaninfo/CMakeLists.txt4
2 files changed, 4 insertions, 4 deletions
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index ef05db18..b3fce384 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -70,8 +70,8 @@ endif()
if(WIN32)
add_definitions(-DVK_USE_PLATFORM_WIN32_KHR -DWIN32_LEAN_AND_MEAN)
- if(NOT MSVC_VERSION LESS 1900)
- # Enable control flow guard
+ if(MSVC AND NOT MSVC_VERSION LESS 1900)
+ # If MSVC, Enable control flow guard
message(STATUS "Building vkcube with control flow guard")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/guard:cf>")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf")
diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
index b922e2aa..6627b7d2 100644
--- a/vulkaninfo/CMakeLists.txt
+++ b/vulkaninfo/CMakeLists.txt
@@ -86,8 +86,8 @@ endif()
if(WIN32)
target_compile_definitions(vulkaninfo PUBLIC -DVK_USE_PLATFORM_WIN32_KHR -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DVK_NO_PROTOTYPES)
- if(NOT MSVC_VERSION LESS 1900)
- # Enable control flow guard
+ if(MSVC AND NOT MSVC_VERSION LESS 1900)
+ # If MSVC, Enable control flow guard
message(STATUS "Building vulkaninfo with control flow guard")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/guard:cf>")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf")