incomplete-genex.cmake 731 B

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