Files
Matthew Woehlke 344f23bac4 CPS: Fix C features
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
2026-02-19 15:13:24 -05:00

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)