ExcludeFromAll.cmake 400 B

1234567
  1. # Test an interface library with a custom command, but excluded from all.
  2. add_custom_command(OUTPUT iface.txt COMMAND ${CMAKE_COMMAND} -E touch iface.txt)
  3. add_library(iface INTERFACE EXCLUDE_FROM_ALL iface.txt)
  4. # Test that EXCLUDE_FROM_ALL is allowed even if the interface library has
  5. # no sources, and does not cause it to appear in the build system.
  6. add_library(iface2 INTERFACE EXCLUDE_FROM_ALL)