Browse Source

Tests/RunCMake/CommandLine: Simplify --toolchain cases

Brad King 5 months ago
parent
commit
cf0f46ed85

+ 0 - 1
Tests/RunCMake/CommandLine/RunCMakeTest.cmake

@@ -274,7 +274,6 @@ function(run_Toolchain)
   # precedence over source dir
   file(WRITE ${binary_dir}/toolchain.cmake [=[
 set(CMAKE_SYSTEM_NAME Linux)
-set(toolchain_file binary_dir)
 ]=])
   run_cmake_with_options(toolchain-valid-rel-build-path -S ${source_dir} -B ${binary_dir} --toolchain toolchain.cmake)
 endfunction()

+ 1 - 1
Tests/RunCMake/CommandLine/Toolchain/CMakeLists.txt

@@ -1,3 +1,3 @@
 cmake_minimum_required(VERSION 3.20)
 project(Toolchain LANGUAGES NONE)
-message(FATAL_ERROR "${toolchain_file}")
+message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")

+ 0 - 1
Tests/RunCMake/CommandLine/Toolchain/toolchain.cmake

@@ -1,2 +1 @@
 set(CMAKE_SYSTEM_NAME Linux)
-set(toolchain_file source_dir)

+ 0 - 1
Tests/RunCMake/CommandLine/toolchain-valid-abs-path-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 1
Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stderr.txt

@@ -1 +0,0 @@
-^CMake Error.*source_dir

+ 1 - 0
Tests/RunCMake/CommandLine/toolchain-valid-abs-path-stdout.txt

@@ -0,0 +1 @@
+CMAKE_TOOLCHAIN_FILE='[^']*/Tests/RunCMake/CommandLine/Toolchain/toolchain\.cmake'

+ 0 - 1
Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 2
Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stderr.txt

@@ -1,2 +0,0 @@
-^CMake Error at CMakeLists.txt:[0-9] \(message\):
-  binary_dir$

+ 1 - 0
Tests/RunCMake/CommandLine/toolchain-valid-rel-build-path-stdout.txt

@@ -0,0 +1 @@
+CMAKE_TOOLCHAIN_FILE='[^']*/Tests/RunCMake/CommandLine/Toolchain-build/toolchain\.cmake'

+ 0 - 1
Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 1
Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stderr.txt

@@ -1 +0,0 @@
-^CMake Error.*source_dir

+ 1 - 0
Tests/RunCMake/CommandLine/toolchain-valid-rel-src-path-stdout.txt

@@ -0,0 +1 @@
+CMAKE_TOOLCHAIN_FILE='[^']*/Tests/RunCMake/CommandLine/Toolchain/toolchain\.cmake'