RunCMakeTest.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. include(RunCMake)
  2. # Use an initial cache file to define the project() variables
  3. # to avoid long command lines. Also see the CMakeOnly test case
  4. # which tests some of the individual variables one at a time.
  5. # Here, we are focused on testing that the variables are all injected
  6. # at the expected points in the expected order.
  7. run_cmake_with_options(CodeInjection
  8. -C "${CMAKE_CURRENT_LIST_DIR}/CodeInjection/initial_cache.cmake"
  9. )
  10. if(CMake_TEST_RESOURCES)
  11. run_cmake(ExplicitRC)
  12. endif()
  13. set(RunCMake_DEFAULT_stderr .)
  14. run_cmake(LanguagesDuplicate)
  15. unset(RunCMake_DEFAULT_stderr)
  16. run_cmake(LanguagesImplicit)
  17. run_cmake(LanguagesEmpty)
  18. run_cmake(LanguagesNONE)
  19. run_cmake(LanguagesTwice)
  20. run_cmake(LanguagesUnordered)
  21. if(RunCMake_GENERATOR MATCHES "Make|Ninja")
  22. run_cmake(LanguagesUsedButNotEnabled)
  23. endif()
  24. run_cmake(ProjectDescription)
  25. run_cmake(ProjectDescription2)
  26. run_cmake(ProjectDescriptionNoArg)
  27. run_cmake(ProjectDescriptionNoArg2)
  28. run_cmake(ProjectHomepage)
  29. run_cmake(ProjectHomepage2)
  30. run_cmake(ProjectHomepageNoArg)
  31. run_cmake(ProjectIsTopLevel)
  32. run_cmake(ProjectIsTopLevelMultiple)
  33. run_cmake(ProjectIsTopLevelSubdirectory)
  34. run_cmake(ProjectTwice)
  35. run_cmake(VersionAndLanguagesEmpty)
  36. run_cmake(VersionEmpty)
  37. run_cmake(VersionInvalid)
  38. run_cmake(VersionMissingLanguages)
  39. run_cmake(VersionMissingValueOkay)
  40. run_cmake(VersionTwice)
  41. run_cmake(VersionMax)
  42. run_cmake(CMP0048-OLD)
  43. run_cmake(CMP0048-OLD-VERSION)
  44. run_cmake(CMP0048-WARN)
  45. run_cmake(CMP0048-NEW)
  46. run_cmake(CMP0096-WARN)
  47. run_cmake(CMP0096-OLD)
  48. run_cmake(CMP0096-NEW)