Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Ramos <[email protected]>
  • Loading branch information
christophe-lunarg and juan-lunarg authored Sep 7, 2023
1 parent 4b39429 commit 52c518e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,32 @@ if (VUL_WERROR)
endif()
endif()

add_compile_options("$<IF:$<CXX_COMPILER_ID:MSVC>,/W4,-Wall -Wextra>")
if(${CMAKE_CXX_COMPILER_ID} MATCHES "(GNU|Clang)")
add_compile_options(
-Wall
-Wextra
-Wpointer-arith
)
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_compile_options(
-Wconversion
-Wimplicit-fallthrough
-Wstring-conversion
)
endif()
elseif(MSVC)
add_compile_options(
/W4
/we5038 # Enable warning about MIL ordering in constructors
)

# Enforce stricter ISO C++
add_compile_options(/permissive-)

# Allow usage of unsafe CRT functions and minimize what Windows.h leaks
add_compile_definitions(_CRT_SECURE_NO_WARNINGS NOMINMAX WIN32_LEAN_AND_MEAN)

add_compile_options($<$<BOOL:${MSVC_IDE}>:/MP>) # Speed up Visual Studio builds

add_library(VulkanUtilityHeaders INTERFACE)
add_library(Vulkan::UtilityHeaders ALIAS VulkanUtilityHeaders)
Expand Down

0 comments on commit 52c518e

Please sign in to comment.