mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-26 08:44:36 +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::vk-bootstrap ALIAS vk-bootstrap)
|
||||||
|
|
||||||
add_library(vk-bootstrap-compiler-warnings INTERFACE)
|
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
|
target_compile_options(vk-bootstrap-compiler-warnings
|
||||||
INTERFACE
|
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
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
-pedantic-errors
|
-pedantic-errors
|
||||||
-Wconversion
|
-Wconversion
|
||||||
-Wsign-conversion>
|
-Wsign-conversion>
|
||||||
$<$<OR:$<CXX_COMPILER_ID:MSVC>,$<AND:$<CXX_COMPILER_ID:Clang>,$<STREQUAL:"x${CMAKE_CXX_SIMULATE_ID}","xMSVC">>>:
|
$<$<CXX_COMPILER_ID:MSVC>:
|
||||||
/WX
|
/WX
|
||||||
/W4>
|
/W4>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user