cmake/Tests/RunCMake/Codegen/min-graph-3.cmake
2024-11-11 15:18:55 +01:00

13 lines
338 B
CMake

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/error_lib.c
COMMAND
${CMAKE_COMMAND} -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/error.c
${CMAKE_CURRENT_BINARY_DIR}/error_lib.c
CODEGEN
)
# This test will fail if error_lib.c is actually compiled
add_executable(foobar ${CMAKE_CURRENT_BINARY_DIR}/error_lib.c)