MAP_IMPORTED_CONFIG_<CFGX> <CFGY> requires existence of build <CFGY> even when not needed
Example:
MODULE_A defines
- CMAKE_CONFIGURATION_TYPES "Debug;Release"
- TARGET_A with MAP_IMPORTED_CONFIG_RELEASETRACE "Release"
MODULE_B defines
- CMAKE_CONFIGURATION_TYPES "Debug;Release;ReleaseTrace"
- TARGET_B that depends on imported TARGET_A
Both MODULE_A and MODULE_B are build in Debug only
Expected:
- MODULE_B build finish OK.
- Definition MAP_IMPORTED_CONFIG_RELEASETRACE "Release" is ignored when building Debug.
Actual:
- MODULE_B build terminates with error:
- IMPORTED_LOCATION not set for imported target "TARGET_A" configuration "ReleaseTrace".
Workaround:
- Build MODULE_A in both Debug and Release even when only Debug is currently needed.
Code Example:
- Please build and install ModuleA in Debug and then try build ModuleB in Debug
- map-imported-config-issue.zip
Edited by Vladimír Hájek