mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Modify the `export(EXPORT)` and `install(PACKAGE_INFO)` commands to actually enforce that certain arguments must be non-empty. With respect to `export`, this is mainly targeted at CPS export, but ends up affecting all flavors of `export(EXPORT)` because that is the level at which argument parsing is performed. Also, add unit tests to verify that the new rejection of arguments with missing or empty values is working, update the existing tests due to changes in error reporting, and remove no-longer-needed manual validation of an empty `PACKAGE_INFO` argument.
12 lines
282 B
CMake
12 lines
282 B
CMake
add_library(foo foo.cxx)
|
|
add_library(bar foo.cxx)
|
|
target_link_libraries(bar foo)
|
|
|
|
install(TARGETS foo EXPORT foo)
|
|
export(EXPORT foo NAMESPACE "${NAMESPACE}")
|
|
export(EXPORT foo PACKAGE_INFO foo)
|
|
|
|
install(TARGETS bar EXPORT bar)
|
|
export(EXPORT bar)
|
|
export(EXPORT bar PACKAGE_INFO bar)
|