mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
CMake: Make juce_recommended_config_flags CMP0141 aware
This commit is contained in:
parent
58dcf68c53
commit
2dc933fd41
1 changed files with 16 additions and 1 deletions
|
|
@ -120,7 +120,22 @@ add_library(juce::juce_recommended_config_flags ALIAS juce_recommended_config_fl
|
|||
if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC"))
|
||||
_juce_get_debug_config_genex(debug_config)
|
||||
target_compile_options(juce_recommended_config_flags INTERFACE
|
||||
$<IF:${debug_config},/Od /Zi,/Ox> $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">:/MP> /EHsc)
|
||||
$<IF:${debug_config},/Od,/Ox> $<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">:/MP> /EHsc)
|
||||
|
||||
set(needs_debug_flag TRUE)
|
||||
|
||||
if(POLICY CMP0141)
|
||||
set(policy_state)
|
||||
cmake_policy(GET CMP0141 policy_state)
|
||||
|
||||
if("${policy_state}" STREQUAL "NEW")
|
||||
set(needs_debug_flag FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(needs_debug_flag)
|
||||
target_compile_options(juce_recommended_config_flags INTERFACE $<${debug_config}:/Zi>)
|
||||
endif()
|
||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue