diff options
Diffstat (limited to 'Tests/RunCMake/CheckModules')
18 files changed, 72 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt new file mode 100644 index 0000000..65ac8e8 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.11) +project(${RunCMake_TEST}) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-result.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-stderr.txt new file mode 100644 index 0000000..1b8603a --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): + Unknown arguments: + + C + +Call Stack \(most recent call first\): + CheckStructHasMemberMissingKey.cmake:[0-9]+ \(check_struct_has_member\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey.cmake new file mode 100644 index 0000000..49f51ce --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingKey.cmake @@ -0,0 +1,2 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K C) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-result.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-stderr.txt new file mode 100644 index 0000000..8fceab0 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): + Unknown arguments: + + LANGUAGE + +Call Stack \(most recent call first\): + CheckStructHasMemberMissingLanguage.cmake:[0-9]+ \(check_struct_has_member\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage.cmake new file mode 100644 index 0000000..b404d66 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberMissingLanguage.cmake @@ -0,0 +1,2 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAGE) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake new file mode 100644 index 0000000..b319e18 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake @@ -0,0 +1,4 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_C LANGUAGE C) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_CXX LANGUAGE CXX) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-result.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-stderr.txt new file mode 100644 index 0000000..4598867 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): + Unknown arguments: + + LANGUAGE;C;CXX + +Call Stack \(most recent call first\): + CheckStructHasMemberTooManyArguments.cmake:[0-9]+ \(check_struct_has_member\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments.cmake new file mode 100644 index 0000000..12f8158 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberTooManyArguments.cmake @@ -0,0 +1,2 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAGE C CXX) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-result.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-stderr.txt new file mode 100644 index 0000000..ba9e313 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): + Unknown language: + + FORTRAN + + Supported languages: C, CXX. + +Call Stack \(most recent call first\): + CheckStructHasMemberUnknownLanguage.cmake:[0-9]+ \(check_struct_has_member\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage.cmake new file mode 100644 index 0000000..183058d --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberUnknownLanguage.cmake @@ -0,0 +1,2 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAGE FORTRAN) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-result.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt new file mode 100644 index 0000000..b9fbd38 --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): + Unknown arguments: + + LANGUAG;C + +Call Stack \(most recent call first\): + CheckStructHasMemberWrongKey.cmake:[0-9]+ \(check_struct_has_member\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake new file mode 100644 index 0000000..900eb0a --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake @@ -0,0 +1,2 @@ +include(CheckStructHasMember) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAG C) diff --git a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake new file mode 100644 index 0000000..6a6b36e --- /dev/null +++ b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +run_cmake(CheckStructHasMemberOk) +run_cmake(CheckStructHasMemberUnknownLanguage) +run_cmake(CheckStructHasMemberMissingLanguage) +run_cmake(CheckStructHasMemberMissingKey) +run_cmake(CheckStructHasMemberTooManyArguments) +run_cmake(CheckStructHasMemberWrongKey) |