diff options
8 files changed, 32 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake index 22cb466..6e9088f 100644 --- a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake @@ -2,6 +2,7 @@ include(RunCMake) run_cmake(NotEnabledLanguage) run_cmake(NonExistentLanguage) +run_cmake(UnknownArgument) run_cmake(CheckCSourceCompiles) run_cmake(CheckCXXSourceCompiles) diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt new file mode 100644 index 0000000..eed581a --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at [^ +]*/Modules/CheckSourceCompiles.cmake:[0-9]+ \(message\): + Unknown argument: + + BAD + +Call Stack \(most recent call first\): + UnknownArgument.cmake:[0-9]+ \(check_source_compiles\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake new file mode 100644 index 0000000..3b861da --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake @@ -0,0 +1,5 @@ + +enable_language (C) +include(CheckSourceCompiles) + +check_source_compiles(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD) diff --git a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake index b27b08d..c99ac8b 100644 --- a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake @@ -2,6 +2,7 @@ include(RunCMake) run_cmake(NotEnabledLanguage) run_cmake(NonExistentLanguage) +run_cmake(UnknownArgument) run_cmake(CheckCSourceRuns) run_cmake(CheckCXXSourceRuns) diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt new file mode 100644 index 0000000..8ae1ea1 --- /dev/null +++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at [^ +]*/Modules/CheckSourceRuns.cmake:[0-9]+ \(message\): + Unknown argument: + + BAD + +Call Stack \(most recent call first\): + UnknownArgument.cmake:[0-9]+ \(check_source_runs\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake new file mode 100644 index 0000000..6e50fa7 --- /dev/null +++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake @@ -0,0 +1,5 @@ + +enable_language (C) +include(CheckSourceRuns) + +check_source_runs(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD) |