From 82948805ecbd5d65db27c646b594f4ce331a8f97 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 8 Apr 2019 09:49:29 -0400 Subject: Tests: Clarify hand-written cases in RunCMake.ParseImplicitIncludeInfo --- .../ParseImplicitIncludeInfo.cmake | 4 ++-- Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.input | 14 -------------- .../RunCMake/ParseImplicitIncludeInfo/data/empty-C.output | 0 .../RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.input | 14 -------------- .../ParseImplicitIncludeInfo/data/empty-CXX.output | 0 .../ParseImplicitIncludeInfo/data/hand-C-empty.input | 14 ++++++++++++++ .../ParseImplicitIncludeInfo/data/hand-C-empty.output | 0 .../ParseImplicitIncludeInfo/data/hand-CXX-empty.input | 14 ++++++++++++++ .../ParseImplicitIncludeInfo/data/hand-CXX-empty.output | 0 9 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.input delete mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.output delete mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.input delete mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.output create mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input create mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.output create mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input create mode 100644 Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index a39a529..41a407f 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -17,8 +17,8 @@ set(targets darwin-C-AppleClang-8.0.0.8000042 darwin-CXX-AppleClang-8.0.0.8000042 darwin_nostdinc-C-AppleClang-8.0.0.8000042 darwin_nostdinc-CXX-AppleClang-8.0.0.8000042 - empty-C empty-CXX freebsd-C-Clang-3.3.0 freebsd-CXX-Clang-3.3.0 freebsd-Fortran-GNU-4.6.4 + hand-C-empty hand-CXX-empty linux-C-GNU-7.3.0 linux-CXX-GNU-7.3.0 linux-Fortran-GNU-7.3.0 linux-C-Intel-18.0.0.20170811 linux-CXX-Intel-18.0.0.20170811 linux-C-PGI-18.10.1 linux-CXX-PGI-18.10.1 @@ -104,7 +104,7 @@ foreach(t ${targets}) file(READ ${outfile} output) string(STRIP "${output}" output) cmake_parse_implicit_include_info("${input}" "${lang}" idirs log state) - if(t MATCHES "^empty-") # empty isn't supposed to parse + if(t MATCHES "-empty$") # empty isn't supposed to parse if("${state}" STREQUAL "done") message("empty parse failed: ${idirs}, log=${log}") endif() diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.input deleted file mode 100644 index b27eb02..0000000 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.input +++ /dev/null @@ -1,14 +0,0 @@ -CMAKE_LANG=C -CMAKE_C_COMPILER_ABI=ELF -CMAKE_C_COMPILER_AR=/usr/bin/gcc-ar-7 -CMAKE_C_COMPILER_ARCHITECTURE_ID= -CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= -CMAKE_C_COMPILER_ID=GNU -CMAKE_C_COMPILER_LAUNCHER= -CMAKE_C_COMPILER_LOADED=1 -CMAKE_C_COMPILER_RANLIB=/usr/bin/gcc-ranlib-7 -CMAKE_C_COMPILER_TARGET= -CMAKE_C_COMPILER_VERSION=7.3.0 -CMAKE_C_COMPILER_VERSION_INTERAL= - -This is a test and there is nothing here to parse. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-C.output deleted file mode 100644 index e69de29..0000000 diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.input deleted file mode 100644 index b983d6b..0000000 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.input +++ /dev/null @@ -1,14 +0,0 @@ -CMAKE_LANG=CXX -CMAKE_CXX_COMPILER_ABI=ELF -CMAKE_CXX_COMPILER_AR=/usr/bin/gcc-ar-7 -CMAKE_CXX_COMPILER_ARCHITECTURE_ID= -CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= -CMAKE_CXX_COMPILER_ID=GNU -CMAKE_CXX_COMPILER_LAUNCHER= -CMAKE_CXX_COMPILER_LOADED=1 -CMAKE_CXX_COMPILER_RANLIB=/usr/bin/gcc-ranlib-7 -CMAKE_CXX_COMPILER_TARGET= -CMAKE_CXX_COMPILER_VERSION=7.3.0 -CMAKE_CXX_COMPILER_VERSION_INTERAL= - -This is a test and there is nothing here to parse. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/empty-CXX.output deleted file mode 100644 index e69de29..0000000 diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input new file mode 100644 index 0000000..b27eb02 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input @@ -0,0 +1,14 @@ +CMAKE_LANG=C +CMAKE_C_COMPILER_ABI=ELF +CMAKE_C_COMPILER_AR=/usr/bin/gcc-ar-7 +CMAKE_C_COMPILER_ARCHITECTURE_ID= +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=GNU +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB=/usr/bin/gcc-ranlib-7 +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=7.3.0 +CMAKE_C_COMPILER_VERSION_INTERAL= + +This is a test and there is nothing here to parse. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.output new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input new file mode 100644 index 0000000..b983d6b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input @@ -0,0 +1,14 @@ +CMAKE_LANG=CXX +CMAKE_CXX_COMPILER_ABI=ELF +CMAKE_CXX_COMPILER_AR=/usr/bin/gcc-ar-7 +CMAKE_CXX_COMPILER_ARCHITECTURE_ID= +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=GNU +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB=/usr/bin/gcc-ranlib-7 +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=7.3.0 +CMAKE_CXX_COMPILER_VERSION_INTERAL= + +This is a test and there is nothing here to parse. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.output new file mode 100644 index 0000000..e69de29 -- cgit v0.12