summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake')
-rw-r--r--Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake
new file mode 100644
index 0000000..b5df84b
--- /dev/null
+++ b/Tests/RunCMake/project/ProjectIsTopLevelSubdirectory.cmake
@@ -0,0 +1,8 @@
+# no project() call, includer already calls project(${RunCMake_TEST} NONE)
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+
+add_subdirectory(ProjectIsTopLevelSubdirectory)
+
+message(STATUS "PROJECT_IS_TOP_LEVEL=${PROJECT_IS_TOP_LEVEL}")
+message(STATUS "${RunCMake_TEST}_IS_TOP_LEVEL=${${RunCMake_TEST}_IS_TOP_LEVEL}")
+message(STATUS "NotTopLevel_IS_TOP_LEVEL=${NotTopLevel_IS_TOP_LEVEL}")