summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-28 14:39:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-02-28 14:39:21 (GMT)
commit30243e7fafee60a8ef6ffc6fb8eed09548a86aa9 (patch)
treef8ed56019a67ea698e8960857816bf51e4563b8e /Tests
parentdda1805f27c40028924cf367492d6990dcf31e96 (diff)
parentded616bdad46a445ea7ae05d47ae8f32026b13b5 (diff)
downloadCMake-30243e7fafee60a8ef6ffc6fb8eed09548a86aa9.zip
CMake-30243e7fafee60a8ef6ffc6fb8eed09548a86aa9.tar.gz
CMake-30243e7fafee60a8ef6ffc6fb8eed09548a86aa9.tar.bz2
Merge topic '16607-error-out-on-non-seekable-input-files'
ded616bd cmListFileLexer: bail out on seek-errors
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/CommandLine/reject_fifo-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/reject_fifo-stderr.txt2
4 files changed, 17 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index bd92013..6423bfd 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -290,7 +290,7 @@ add_RunCMake_test(target_link_libraries)
add_RunCMake_test(target_compile_features)
add_RunCMake_test(CheckModules)
-add_RunCMake_test(CommandLine)
+add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(CommandLineTar)
add_RunCMake_test(install)
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 0c4f71c..b213ee2 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.1)
+
include(RunCMake)
run_cmake_command(NoArgs ${CMAKE_COMMAND})
@@ -301,3 +303,14 @@ set(CMAKE_RELATIVE_PATH_TOP_BINARY \"${RunCMake_TEST_BINARY_DIR}\")
)
endfunction()
run_cmake_depends()
+
+function(reject_fifo)
+ find_program(BASH_EXECUTABLE bash)
+ if(BASH_EXECUTABLE)
+ set(BASH_COMMAND_ARGUMENT "'${CMAKE_COMMAND}' -P <(echo 'return()')")
+ run_cmake_command(reject_fifo ${BASH_EXECUTABLE} -c ${BASH_COMMAND_ARGUMENT})
+ endif()
+endfunction()
+if(CMAKE_HOST_UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN")
+ reject_fifo()
+endif()
diff --git a/Tests/RunCMake/CommandLine/reject_fifo-result.txt b/Tests/RunCMake/CommandLine/reject_fifo-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/reject_fifo-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt b/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt
new file mode 100644
index 0000000..7a335c3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error in .*
+ Error while reading Byte-Order-Mark\. File not seekable\?