Files
CMake/Tests/RunCMake/ExportPackageInfo/DependsMultipleCommon.cmake
Matthew Woehlke 2151e5f79d export, install: Improve argument parsing
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.
2025-12-09 13:37:01 -05:00

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)