mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Change the interface of the `export` command so that `PACKAGE_INFO` and `SBOM` are proper, first-level sub-commands, rather than being implemented via `export(EXPORT ... (PACKAGE_INFO|SBOM) ...)`. This brings consistency with the `install` command and also simplifies argument parsing. Update the documentation and test cases accordingly. Some of the argument handling test cases are now rather gratuitous, and are removed, which also improves consistency with the `install` tests.
14 lines
357 B
CMake
14 lines
357 B
CMake
project(Config CXX)
|
|
|
|
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
if(_isMultiConfig)
|
|
set(CMAKE_CONFIGURATION_TYPES "FooConfig;BarConfig" CACHE STRING "" FORCE)
|
|
else()
|
|
set(CMAKE_BUILD_TYPE "TestConfig" CACHE STRING "" FORCE)
|
|
endif()
|
|
|
|
add_library(foo foo.cxx)
|
|
|
|
install(TARGETS foo EXPORT foo)
|
|
export(PACKAGE_INFO foo EXPORT foo)
|