aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
Diffstat (limited to 'cube')
-rw-r--r--cube/CMakeLists.txt4
1 files changed, 2 insertions, 2 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")