summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION.cmake
blob: 1afb2b56f4d114383448b0ad15b2449aa611d582 (plain)
1
2
3
4
5
6
7
8

enable_language(CXX)

add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp"
  COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<CXX_COMPILER_VERSION>.cpp"
)

add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp")