exclude-from-all.cmake 365 B

1234567891011
  1. add_custom_command(
  2. OUTPUT
  3. ${CMAKE_CURRENT_BINARY_DIR}/generated.h
  4. COMMAND
  5. ${CMAKE_COMMAND} -E false
  6. CODEGEN
  7. )
  8. # We don't want codegen to drive parts of the project that are EXCLUDE_FROM_ALL.
  9. # This tests that foobar is properly excluded from the codegen build.
  10. add_executable(foobar EXCLUDE_FROM_ALL error.c ${CMAKE_CURRENT_BINARY_DIR}/generated.h)