diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-04-23 16:47:22 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-04-23 16:47:22 (GMT) |
commit | d837f8b6fb30c34e167c35f7e85ac3b7b19adccf (patch) | |
tree | 019af81ce98a755600df6a5b83efcfd312797961 /Tests/RunCMake/Ninja | |
parent | b45976fe104902ed7f0495e0e4c822684a4455e7 (diff) | |
parent | 61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542 (diff) | |
download | CMake-d837f8b6fb30c34e167c35f7e85ac3b7b19adccf.zip CMake-d837f8b6fb30c34e167c35f7e85ac3b7b19adccf.tar.gz CMake-d837f8b6fb30c34e167c35f7e85ac3b7b19adccf.tar.bz2 |
Merge branch 'master' into ninja-order-only-fix
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 6 | ||||
-rwxr-xr-x | Tests/RunCMake/Ninja/SelectCompiler/1/gcc | 2 | ||||
-rwxr-xr-x | Tests/RunCMake/Ninja/SelectCompiler/2/cc | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/SelectCompilerWindows.cmake | 3 |
9 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 0eada08..8f9c263 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -18,6 +18,12 @@ else() message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}") endif() +if(CMAKE_HOST_WIN32) + run_cmake(SelectCompilerWindows) +else() + run_cmake(SelectCompilerUNIX) +endif() + function(run_NinjaToolMissing) set(RunCMake_MAKE_PROGRAM ninja-tool-missing) run_cmake(NinjaToolMissing) diff --git a/Tests/RunCMake/Ninja/SelectCompiler/1/gcc b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc new file mode 100755 index 0000000..151dfa6 --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc @@ -0,0 +1,2 @@ +#!/bin/sh +false diff --git a/Tests/RunCMake/Ninja/SelectCompiler/2/cc b/Tests/RunCMake/Ninja/SelectCompiler/2/cc new file mode 100755 index 0000000..151dfa6 --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompiler/2/cc @@ -0,0 +1,2 @@ +#!/bin/sh +false diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt b/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt b/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt new file mode 100644 index 0000000..a2baa48 --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at .*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(message\): + The C compiler + + "[^"]*/Tests/RunCMake/Ninja/SelectCompiler/2/cc" + + is not able to compile a simple test program. diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake b/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake new file mode 100644 index 0000000..02c8439 --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake @@ -0,0 +1,3 @@ +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/1:${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/2:$ENV{PATH}") +unset(ENV{CC}) +enable_language(C) diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt b/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt b/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt new file mode 100644 index 0000000..e4b506e --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at .*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(message\): + The C compiler + + "[^"]*/Tests/RunCMake/Ninja/SelectCompiler/1/gcc" + + is not able to compile a simple test program. diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake b/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake new file mode 100644 index 0000000..f5a7e2b --- /dev/null +++ b/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake @@ -0,0 +1,3 @@ +set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/1;${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/2;$ENV{PATH}") +unset(ENV{CC}) +enable_language(C) |