min-graph-3.cmake 338 B

123456789101112
  1. add_custom_command(
  2. OUTPUT
  3. ${CMAKE_CURRENT_BINARY_DIR}/error_lib.c
  4. COMMAND
  5. ${CMAKE_COMMAND} -E
  6. copy ${CMAKE_CURRENT_SOURCE_DIR}/error.c
  7. ${CMAKE_CURRENT_BINARY_DIR}/error_lib.c
  8. CODEGEN
  9. )
  10. # This test will fail if error_lib.c is actually compiled
  11. add_executable(foobar ${CMAKE_CURRENT_BINARY_DIR}/error_lib.c)