incomplete-genex.cmake 761 B

1234567891011121314151617181920212223
  1. enable_language(CXX)
  2. cmake_policy(SET CMP0022 NEW)
  3. cmake_policy(SET CMP0023 NEW)
  4. add_library(somelib empty.cpp)
  5. # This test ensures that some internal mechanisms of cmGeneratorExpression
  6. # do not segfault (#14410).
  7. # Test that cmGeneratorExpression::Preprocess(StripAllGeneratorExpressions)
  8. # does not segfault
  9. target_include_directories(somelib PUBLIC
  10. "/include;/include/$<BUILD_INTERFACE:subdir"
  11. )
  12. # Test that cmGeneratorExpression::Preprocess(BuildInterface) does not segfault
  13. export(TARGETS somelib FILE somelibTargets.cmake)
  14. install(TARGETS somelib EXPORT someExport DESTINATION prefix)
  15. # Test that cmGeneratorExpression::Preprocess(InstallInterface)
  16. # and cmGeneratorExpression::Split do not segfault
  17. install(EXPORT someExport DESTINATION prefix)