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.
18 lines
506 B
18 lines
506 B
10 years ago
|
|
||
|
set(genexvar $<COMPILE_FEATURES:cxx_final>)
|
||
|
|
||
|
if (HAVE_FINAL)
|
||
|
set(expected_result 1)
|
||
|
else()
|
||
|
set(expected_result 0)
|
||
|
endif()
|
||
|
|
||
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${expected_result}.cpp"
|
||
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp"
|
||
|
)
|
||
|
|
||
|
add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")
|
||
|
if (HAVE_FINAL)
|
||
|
target_compile_features(empty PRIVATE cxx_final)
|
||
|
endif()
|