diff options
Diffstat (limited to 'Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake')
-rw-r--r-- | Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index 5880378..abd0eaa 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -32,7 +32,8 @@ set(targets linux_nostdinc-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 linux_nostdinc_i-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 linux-C-XL-16.1.0.0 linux-CXX-XL-16.1.0.0 - linux-CUDA-NVIDIA-9.2.148 + linux-CUDA-NVIDIA-10.1.168-CLANG linux-CUDA-NVIDIA-10.1.168-XLClang-v-empty + linux-CUDA-NVIDIA-9.2.148-GCC mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3 netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5 netbsd_nostdinc-C-GNU-4.8.5 netbsd_nostdinc-CXX-GNU-4.8.5 @@ -97,22 +98,30 @@ endfunction() # main test loop # foreach(t ${targets}) - set(infile "${CMAKE_SOURCE_DIR}/data/${t}.input") - set(outfile "${CMAKE_SOURCE_DIR}/data/${t}.output") - if (NOT EXISTS ${infile} OR NOT EXISTS ${outfile}) - message("missing files for target ${t} in ${CMAKE_SOURCE_DIR}/data") + set(infile "${CMAKE_SOURCE_DIR}/../ParseImplicitData/${t}.input") + set(outfile "${CMAKE_SOURCE_DIR}/results/${t}.output") + if (NOT EXISTS ${infile}) + string(REPLACE "-empty" "" infile "${infile}") + if (NOT EXISTS ${infile}) + message("missing input file for target ${t} in ${CMAKE_SOURCE_DIR}/../ParseImplicitData/") + continue() + endif() + elseif(NOT EXISTS ${outfile}) + message("missing files for target ${t} in ${CMAKE_SOURCE_DIR}/results/") continue() endif() + load_compiler_info(${infile} lang cmvars input) 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("${state}" STREQUAL "done") message("empty parse failed: ${idirs}, log=${log}") endif() elseif(NOT "${state}" STREQUAL "done" OR NOT "${idirs}" MATCHES "^${output}$") - message("parse failed: state=${state}, '${idirs}' does not match '^${output}$', log=${log}") + message("${t} parse failed: state=${state}, '${idirs}' does not match '^${output}$', log=${log}") endif() unload_compiler_info("${cmvars}") endforeach(t) |