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