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> )