mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Fix a typo in the logic that generates CPS compile features for C language standards. Update tests to cover both C and C++. Fixes: #27618
17 lines
590 B
CMake
17 lines
590 B
CMake
add_library(foo INTERFACE)
|
|
|
|
target_compile_features(foo INTERFACE c_std_17 cxx_std_23)
|
|
target_compile_options(foo INTERFACE -ffast-math)
|
|
target_compile_definitions(foo INTERFACE -DFOO -DBAR=BAR)
|
|
target_include_directories(
|
|
foo INTERFACE
|
|
$<INSTALL_INTERFACE:include/foo>
|
|
)
|
|
target_link_directories(foo INTERFACE /opt/foo/lib)
|
|
target_link_options(foo INTERFACE --needed)
|
|
target_link_libraries(foo INTERFACE /usr/lib/libm.so)
|
|
set_property(TARGET foo PROPERTY SPDX_LICENSE "BSD-3-Clause")
|
|
|
|
install(TARGETS foo EXPORT foo DESTINATION .)
|
|
install(PACKAGE_INFO foo DESTINATION cps EXPORT foo)
|