mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-26 00:34:35 +00:00
Fixed detection of clang++ on windows
This commit is contained in:
parent
c79482c0b1
commit
3cc83cf6f8
@ -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
|
||||
$<$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>,$<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<STREQUAL:"x${CMAKE_CXX_SIMULATE_ID}","xMSVC">>>>:
|
||||
$<$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>,${VK_BOOTSTRAP_COMPILER_CLANGPP}>:
|
||||
-Wall
|
||||
-Wextra
|
||||
-pedantic-errors
|
||||
-Wconversion
|
||||
-Wsign-conversion>
|
||||
$<$<OR:$<CXX_COMPILER_ID:MSVC>,$<AND:$<CXX_COMPILER_ID:Clang>,$<STREQUAL:"x${CMAKE_CXX_SIMULATE_ID}","xMSVC">>>:
|
||||
$<$<CXX_COMPILER_ID:MSVC>:
|
||||
/WX
|
||||
/W4>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user