Debian Codegraph @

Tests/RunCMake/Codegen/exclude-from-all.cmake

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