| 1 |
set(root_test OFF) |
| 2 |
if(RunCMake_TEST STREQUAL "ParentVariableRoot" OR |
| 3 |
RunCMake_TEST STREQUAL "CMP0198-NEW-root" OR |
| 4 |
RunCMake_TEST STREQUAL "CMP0198-implicit-NEW-root" OR |
| 5 |
RunCMake_TEST STREQUAL "CMP0198-OLD-root" OR |
| 6 |
RunCMake_TEST STREQUAL "CMP0198-WARN-root") |
| 7 |
set(root_test ON) |
| 8 |
endif() |
| 9 |
|
| 10 |
if(root_test) |
| 11 |
message(STATUS "CMakeLists\.txt: '${CMAKE_PARENT_LIST_FILE}'") |
| 12 |
endif() |
| 13 |
|
| 14 |
if(RunCMake_TEST STREQUAL "CMP0198-implicit-NEW-root") |
| 15 |
cmake_minimum_required(VERSION 4.1...4.2) |
| 16 |
else() |
| 17 |
cmake_minimum_required(VERSION 3.10) |
| 18 |
endif() |
| 19 |
|
| 20 |
project(${RunCMake_TEST} NONE) |
| 21 |
|
| 22 |
if(root_test) |
| 23 |
message(STATUS "CMakeLists\.txt: '${CMAKE_PARENT_LIST_FILE}'") |
| 24 |
include(ParentVariableRoot/include1.cmake) |
| 25 |
message(STATUS "CMakeLists\.txt: '${CMAKE_PARENT_LIST_FILE}'") |
| 26 |
return() |
| 27 |
endif() |
| 28 |
|
| 29 |
include(${RunCMake_TEST}.cmake) |