diff options
author | Brad King <brad.king@kitware.com> | 2014-05-20 14:42:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-20 15:07:51 (GMT) |
commit | 2c448dbfe762278480bfd4f8ba9f458f9a104941 (patch) | |
tree | 2f968f7d4af76e4017c4fb9eb4f9c37c624bdc83 /Tests/RunCMake/file | |
parent | 2d5e3d2d2bfd79311c40db173d13f6d0cfb10019 (diff) | |
download | CMake-2c448dbfe762278480bfd4f8ba9f458f9a104941.zip CMake-2c448dbfe762278480bfd4f8ba9f458f9a104941.tar.gz CMake-2c448dbfe762278480bfd4f8ba9f458f9a104941.tar.bz2 |
file: Report system error on failure to open file
Diffstat (limited to 'Tests/RunCMake/file')
-rw-r--r-- | Tests/RunCMake/file/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/file/FileOpenFailRead-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/file/FileOpenFailRead-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/file/FileOpenFailRead.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/file/RunCMakeTest.cmake | 3 |
5 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt new file mode 100644 index 0000000..2897109 --- /dev/null +++ b/Tests/RunCMake/file/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file/FileOpenFailRead-result.txt b/Tests/RunCMake/file/FileOpenFailRead-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt new file mode 100644 index 0000000..23d4337 --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at FileOpenFailRead.cmake:[0-9]+ \(file\): + file failed to open for reading \(.*\): + + .*/Tests/RunCMake/file/does_not_exist/file.txt +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/file/FileOpenFailRead.cmake b/Tests/RunCMake/file/FileOpenFailRead.cmake new file mode 100644 index 0000000..4d4c6dc --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead.cmake @@ -0,0 +1 @@ +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist/file.txt" content) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake new file mode 100644 index 0000000..7b05229 --- /dev/null +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(FileOpenFailRead) |