summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/find_path
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/find_path')
-rw-r--r--Tests/RunCMake/find_path/Required-result.txt1
-rw-r--r--Tests/RunCMake/find_path/Required-stderr.txt4
-rw-r--r--Tests/RunCMake/find_path/Required-stdout.txt1
-rw-r--r--Tests/RunCMake/find_path/Required.cmake12
-rw-r--r--Tests/RunCMake/find_path/RunCMakeTest.cmake1
5 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_path/Required-result.txt b/Tests/RunCMake/find_path/Required-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_path/Required-stderr.txt b/Tests/RunCMake/find_path/Required-stderr.txt
new file mode 100644
index 0000000..db65c2f
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at Required.cmake:9 \(find_path\):
+ Could not find PATH_doNotExists using the following files: doNotExists.h
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_path/Required-stdout.txt b/Tests/RunCMake/find_path/Required-stdout.txt
new file mode 100644
index 0000000..225fcab
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-stdout.txt
@@ -0,0 +1 @@
+-- PATH_exists='[^']*/Tests/RunCMake/find_path/include'
diff --git a/Tests/RunCMake/find_path/Required.cmake b/Tests/RunCMake/find_path/Required.cmake
new file mode 100644
index 0000000..172dc11
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required.cmake
@@ -0,0 +1,12 @@
+find_path(PATH_exists
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_DEFAULT_PATH
+ REQUIRED
+ )
+message(STATUS "PATH_exists='${PATH_exists}'")
+
+find_path(PATH_doNotExists
+ NAMES doNotExists.h
+ REQUIRED
+ )
diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake
index ed55f51..5c919bb 100644
--- a/Tests/RunCMake/find_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake
@@ -3,6 +3,7 @@ include(RunCMake)
run_cmake(EmptyOldStyle)
run_cmake(FromPATHEnv)
run_cmake(PrefixInPATH)
+run_cmake(Required)
if(APPLE)
run_cmake(FrameworksWithSubdirs)