mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
359c500a24
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This would then end up on the link line and cause build failures. Policy CMP0110 is added to control this behaviour. Fixes #19080, #19943.
6 lines
271 B
CMake
6 lines
271 B
CMake
enable_language(C)
|
|
add_library(UnknownImportedGlobal UNKNOWN IMPORTED GLOBAL)
|
|
set_target_properties(UnknownImportedGlobal PROPERTIES IMPORTED_LOCATION "unknown.${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
|
add_library(mylib empty.c)
|
|
target_link_libraries(mylib UnknownImportedGlobal)
|