mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
The logic to select an imported configuration handled the case when `IMPORTED_CONFIGURATIONS` was missing, but assumed that if it was present, it was non-empty, which could cause CMake to crash if that happens. (To be fair, I believe this would never happen for imports generated by CMake.) Adjust the logic slightly to follow the same code path when `IMPORTED_CONFIGURATIONS` is empty as is taken if it's missing. Fixes: #28065
8 lines
250 B
CMake
8 lines
250 B
CMake
cmake_minimum_required(VERSION 4.4)
|
|
project(empty_imported_configuration NONE)
|
|
|
|
add_library(imported UNKNOWN IMPORTED)
|
|
set_property(TARGET imported PROPERTY IMPORTED_CONFIGURATIONS "")
|
|
|
|
file(GENERATE OUTPUT out.txt CONTENT "$<TARGET_FILE:imported>")
|