mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Tests: Add explicit ConfigureLog case to RunCMake.try_compile
This commit is contained in:
1
Tests/RunCMake/try_compile/ConfigureLog-bad.c
Normal file
1
Tests/RunCMake/try_compile/ConfigureLog-bad.c
Normal file
@@ -0,0 +1 @@
|
||||
#error "This does not compile!"
|
||||
45
Tests/RunCMake/try_compile/ConfigureLog-config.txt
Normal file
45
Tests/RunCMake/try_compile/ConfigureLog-config.txt
Normal file
@@ -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
|
||||
\.\.\.$
|
||||
4
Tests/RunCMake/try_compile/ConfigureLog-test.c
Normal file
4
Tests/RunCMake/try_compile/ConfigureLog-test.c
Normal file
@@ -0,0 +1,4 @@
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
9
Tests/RunCMake/try_compile/ConfigureLog.cmake
Normal file
9
Tests/RunCMake/try_compile/ConfigureLog.cmake
Normal file
@@ -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
|
||||
)
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user