Fix generator expression in strip command (#6762)

* Fix generator expression in strip command

* Add TODO comment for CMake 3.19
This commit is contained in:
Dominic Clark
2023-08-31 02:01:15 +01:00
committed by GitHub
parent fcdf4c0568
commit 3263bfd555

View File

@@ -605,7 +605,9 @@ else()
set(NOOP_COMMAND "${CMAKE_COMMAND}" "-E" "echo")
endif()
if(STRIP)
set(STRIP_COMMAND "$<IF:$<TARGET:Debug,RelWithDebInfo>,${NOOP_COMMAND},${STRIP}>")
# TODO CMake 3.19: Now that CONFIG generator expressions support testing for
# multiple configurations, combine the OR into a single CONFIG expression.
set(STRIP_COMMAND "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,${NOOP_COMMAND},${STRIP}>")
else()
set(STRIP_COMMAND "${NOOP_COMMAND}")
endif()