enable_language(C) add_custom_command( OUTPUT main.c COMMAND ${CMAKE_COMMAND} -E copy main.c.in main.c DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/main.c.in ) add_executable(main main.c) set_property(TARGET main PROPERTY UNITY_BUILD ON) file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " set(check_pairs \"$|${CMAKE_CURRENT_BINARY_DIR}/main.c.in\" \"$|${CMAKE_CURRENT_BINARY_DIR}/main.c\" ) set(check_exes \"$\" ) ")