From 3cc83cf6f8a5dc076f963048fe0dff80d67185fc Mon Sep 17 00:00:00 2001
From: Piotr Kocia
Date: Thu, 14 May 2020 08:20:46 -0400
Subject: [PATCH] Fixed detection of clang++ on windows
---
CMakeLists.txt | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d20e9ff..1e042a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,15 +7,24 @@ add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp)
add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
add_library(vk-bootstrap-compiler-warnings INTERFACE)
+
+# Determine whether we're compiling with clang++
+string(FIND "${CMAKE_CXX_COMPILER}" "clang++" VK_BOOTSTRAP_COMPILER_CLANGPP)
+if(VK_BOOTSTRAP_COMPILER_CLANGPP GREATER -1)
+ set(VK_BOOTSTRAP_COMPILER_CLANGPP 1)
+else()
+ set(VK_BOOTSTRAP_COMPILER_CLANGPP 0)
+endif()
+
target_compile_options(vk-bootstrap-compiler-warnings
INTERFACE
- $<$,$,$,$>>>:
+ $<$,$,${VK_BOOTSTRAP_COMPILER_CLANGPP}>:
-Wall
-Wextra
-pedantic-errors
-Wconversion
-Wsign-conversion>
- $<$,$,$>>:
+ $<$:
/WX
/W4>
)