diff options
Diffstat (limited to 'Tests/RunCMake/find_file')
-rw-r--r-- | Tests/RunCMake/find_file/Required-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/find_file/Required-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/find_file/Required-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/find_file/Required.cmake | 12 | ||||
-rw-r--r-- | Tests/RunCMake/find_file/RunCMakeTest.cmake | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_file/Required-result.txt b/Tests/RunCMake/find_file/Required-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_file/Required-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_file/Required-stderr.txt b/Tests/RunCMake/find_file/Required-stderr.txt new file mode 100644 index 0000000..f9c337c --- /dev/null +++ b/Tests/RunCMake/find_file/Required-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at Required.cmake:9 \(find_file\): + Could not find FILE_doNotExists using the following files: doNotExists.h +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/find_file/Required-stdout.txt b/Tests/RunCMake/find_file/Required-stdout.txt new file mode 100644 index 0000000..87a8e86 --- /dev/null +++ b/Tests/RunCMake/find_file/Required-stdout.txt @@ -0,0 +1 @@ +-- FILE_exists='[^']*/Tests/RunCMake/find_file/include/PrefixInPATH.h' diff --git a/Tests/RunCMake/find_file/Required.cmake b/Tests/RunCMake/find_file/Required.cmake new file mode 100644 index 0000000..9cf0927 --- /dev/null +++ b/Tests/RunCMake/find_file/Required.cmake @@ -0,0 +1,12 @@ +find_file(FILE_exists + NAMES PrefixInPATH.h + PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include + NO_DEFAULT_PATH + REQUIRED + ) +message(STATUS "FILE_exists='${FILE_exists}'") + +find_file(FILE_doNotExists + NAMES doNotExists.h + REQUIRED + ) diff --git a/Tests/RunCMake/find_file/RunCMakeTest.cmake b/Tests/RunCMake/find_file/RunCMakeTest.cmake index 9f56a57..93dfb78 100644 --- a/Tests/RunCMake/find_file/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_file/RunCMakeTest.cmake @@ -3,3 +3,4 @@ include(RunCMake) run_cmake(FromPATHEnv) run_cmake(FromPrefixPath) run_cmake(PrefixInPATH) +run_cmake(Required) |