Debian Codegraph @

Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake

raw
1
2 set(genexvar $<COMPILE_FEATURES:cxx_final>)
3
4 if (HAVE_FINAL)
5 set(expected_result 1)
6 else()
7 set(expected_result 0)
8 endif()
9
10 add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${expected_result}.cpp"
11 COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp"
12 )
13
14 add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")
15 if (HAVE_FINAL)
16 target_compile_features(empty PRIVATE cxx_final)
17 endif()