summaryrefslogtreecommitdiffstats
path: root/Modules/FindIce.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-03 15:12:01 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-03 15:14:29 (GMT)
commitff386d1121ec52854d522d3bb9c86fab286d58ef (patch)
tree3b1d9d71f628227661992346e791ebdd9f07fa80 /Modules/FindIce.cmake
parent382c4fca6b895c2c7a68445918a8fd73a15e1f91 (diff)
downloadCMake-ff386d1121ec52854d522d3bb9c86fab286d58ef.zip
CMake-ff386d1121ec52854d522d3bb9c86fab286d58ef.tar.gz
CMake-ff386d1121ec52854d522d3bb9c86fab286d58ef.tar.bz2
Modules: Make imported targets fall back to `Release`
Find modules only detect Debug and Release configurations. All other configurations will fall back to the configuration listed as the first entry in `IMPORTED_CONFIGURATIONS`. Switch the order so that `Release` is listed first, as this is a better fallback than `Debug` for the `RelWithDebInfo` and `MinSizeRel` configurations. See issue #16091. This approach is recommended by documentation in `cmake-developer(7)` added by commit v3.2.0-rc1~286^2~1 (Help: Document IMPORTED_CONFIGURATIONS target property for Find modules, 2014-12-04).
Diffstat (limited to 'Modules/FindIce.cmake')
-rw-r--r--Modules/FindIce.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
index 8f548cd..2bd39e8 100644
--- a/Modules/FindIce.cmake
+++ b/Modules/FindIce.cmake
@@ -466,13 +466,6 @@ if(Ice_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${${_Ice_component_cache}}")
endif()
- if(EXISTS "${${_Ice_component_cache_debug}}")
- set_property(TARGET ${_Ice_imported_target} APPEND PROPERTY
- IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(${_Ice_imported_target} PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
- IMPORTED_LOCATION_DEBUG "${${_Ice_component_cache_debug}}")
- endif()
if(EXISTS "${${_Ice_component_cache_release}}")
set_property(TARGET ${_Ice_imported_target} APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
@@ -480,6 +473,13 @@ if(Ice_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${${_Ice_component_cache_release}}")
endif()
+ if(EXISTS "${${_Ice_component_cache_debug}}")
+ set_property(TARGET ${_Ice_imported_target} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(${_Ice_imported_target} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+ IMPORTED_LOCATION_DEBUG "${${_Ice_component_cache_debug}}")
+ endif()
endif()
endif()
unset(_Ice_component_upcase)