2014-05-15 11:32:30 +02:00
|
|
|
|
|
|
|
set(genexvar $<COMPILE_FEATURES:cxx_final>)
|
|
|
|
|
|
|
|
if (HAVE_FINAL)
|
|
|
|
set(expected_result 1)
|
|
|
|
else()
|
|
|
|
set(expected_result 0)
|
|
|
|
endif()
|
|
|
|
|
2014-12-31 10:25:33 -05:00
|
|
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${expected_result}.cpp"
|
2014-05-15 11:32:30 +02:00
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp"
|
|
|
|
)
|
|
|
|
|
2015-01-14 13:41:45 -05:00
|
|
|
add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")
|
2014-05-15 11:32:30 +02:00
|
|
|
if (HAVE_FINAL)
|
|
|
|
target_compile_features(empty PRIVATE cxx_final)
|
|
|
|
endif()
|