You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake

13 lines
269 B

enable_language(CXX C)
add_library(empty empty.cpp empty.c)
target_compile_options(empty
PRIVATE LANG_IS_$<COMPILE_LANGUAGE>
)
file(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/opts-$<COMPILE_LANGUAGE>.txt
CONTENT "$<TARGET_PROPERTY:empty,COMPILE_OPTIONS>\n"
)