aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorBiswapriyo Nath <nathbappai@gmail.com>2020-08-25 01:45:53 +0530
committerjeremyk-lunarg <jeremyk@lunarg.com>2020-08-26 16:35:43 -0600
commitd23e1ea399617e4ddbb0bc0ac8abb4f7b47ace1f (patch)
tree6393e653f2fbdf89f39a18862608ee87657804f7 /cube
parentdda8dabe9eb38eb79a6bc3c17d9ee21917011852 (diff)
downloadusermoji-d23e1ea399617e4ddbb0bc0ac8abb4f7b47ace1f.tar.xz
CMake: Check MSVC while deciding MSVC_VERSION
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")