mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 06:20:23 +00:00
Features: Properly evaluate if the compiler supports cxx_final.
Previously we expanded HAVE_FINAL to determine what the copied_file number would be, but when we don't have cxx_final than HAVE_FINAL is not defined. What we really want is to use expected_result.
This commit is contained in:
parent
6296192def
commit
07d1f6fca1
@ -7,11 +7,11 @@ else()
|
||||
set(expected_result 0)
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${HAVE_FINAL}.cpp"
|
||||
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")
|
||||
add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${expected_result}.cpp")
|
||||
if (HAVE_FINAL)
|
||||
target_compile_features(empty PRIVATE cxx_final)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user