summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-13 16:27:52 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-16 21:58:49 (GMT)
commit0418efb7added53ff83e0868d44ea8965ec15027 (patch)
tree3ecb669b04bba827e6e4d131c7462c1eddb37554 /Tests
parent189557bd74345590d3f5378c6e00cf1dad9778dc (diff)
downloadCMake-0418efb7added53ff83e0868d44ea8965ec15027.zip
CMake-0418efb7added53ff83e0868d44ea8965ec15027.tar.gz
CMake-0418efb7added53ff83e0868d44ea8965ec15027.tar.bz2
Tests: Add explicit ConfigureLog case to RunCMake.try_compile
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/try_compile/ConfigureLog-bad.c1
-rw-r--r--Tests/RunCMake/try_compile/ConfigureLog-config.txt45
-rw-r--r--Tests/RunCMake/try_compile/ConfigureLog-test.c4
-rw-r--r--Tests/RunCMake/try_compile/ConfigureLog.cmake9
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake1
5 files changed, 60 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/ConfigureLog-bad.c b/Tests/RunCMake/try_compile/ConfigureLog-bad.c
new file mode 100644
index 0000000..6508ead
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ConfigureLog-bad.c
@@ -0,0 +1 @@
+#error "This does not compile!"
diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt
new file mode 100644
index 0000000..6ed3bfe
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt
@@ -0,0 +1,45 @@
+^
+---
+events:
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "[^"]*/Modules/CMakeDetermineCompilerABI.cmake:[0-9]+ \(try_compile\)"
+ - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)"
+ - "ConfigureLog.cmake:[0-9]+ \(enable_language\)"
+ - "CMakeLists.txt:[0-9]+ \(include\)"
+ directories:
+ source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ buildResult:
+ variable: "CMAKE_C_ABI_COMPILED"
+ cached: true
+ stdout: \|.*
+ exitCode: 0
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "ConfigureLog.cmake:[0-9]+ \(try_compile\)"
+ - "CMakeLists.txt:[0-9]+ \(include\)"
+ directories:
+ source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ buildResult:
+ variable: "COMPILE_RESULT"
+ cached: true
+ stdout: \|.*
+ exitCode: [1-9][0-9]*
+ -
+ kind: "try_compile-v1"
+ backtrace:
+ - "ConfigureLog.cmake:[0-9]+ \(try_compile\)"
+ - "CMakeLists.txt:[0-9]+ \(include\)"
+ directories:
+ source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+"
+ buildResult:
+ variable: "COMPILE_RESULT"
+ cached: true
+ stdout: \|.*
+ exitCode: 0
+\.\.\.$
diff --git a/Tests/RunCMake/try_compile/ConfigureLog-test.c b/Tests/RunCMake/try_compile/ConfigureLog-test.c
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ConfigureLog-test.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/try_compile/ConfigureLog.cmake b/Tests/RunCMake/try_compile/ConfigureLog.cmake
new file mode 100644
index 0000000..f475014
--- /dev/null
+++ b/Tests/RunCMake/try_compile/ConfigureLog.cmake
@@ -0,0 +1,9 @@
+enable_language(C)
+
+try_compile(COMPILE_RESULT
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-bad.c
+ )
+
+try_compile(COMPILE_RESULT
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c
+ )
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index ad1cc29..51ccac8 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cmake_with_options(Inspect
)
include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake")
+run_cmake(ConfigureLog)
run_cmake(NoArgs)
run_cmake(OneArg)
run_cmake(TwoArgs)