mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
ci,warnings: add configure warning exceptions
This commit is contained in:
parent
d90fcefab4
commit
83b1cb9ecd
@ -10,16 +10,31 @@
|
|||||||
##
|
##
|
||||||
##=============================================================================
|
##=============================================================================
|
||||||
|
|
||||||
# Find the path the logs from the last configure
|
set(configure_warning_exceptions
|
||||||
|
".*CMake Warning at CMake/VTKmDetermineVersion.cmake.*"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Find the path of the logs from the last configure
|
||||||
set(cnf_log_path "${CMAKE_SOURCE_DIR}/build/Testing/Temporary/LastConfigure*.log")
|
set(cnf_log_path "${CMAKE_SOURCE_DIR}/build/Testing/Temporary/LastConfigure*.log")
|
||||||
file(GLOB cnf_log_files ${cnf_log_path})
|
file(GLOB cnf_log_files ${cnf_log_path})
|
||||||
|
|
||||||
|
# Check for warnings during the configure phase
|
||||||
foreach(file IN LISTS cnf_log_files)
|
foreach(file IN LISTS cnf_log_files)
|
||||||
file(STRINGS ${file} lines)
|
file(STRINGS ${file} lines)
|
||||||
string(FIND "${lines}" "Warning" line)
|
foreach(line IN LISTS lines)
|
||||||
if (NOT ${line} EQUAL "-1")
|
if ("${line}" MATCHES "Warning|WARNING|warning")
|
||||||
message(FATAL_ERROR "Configure warnings detected, please check cdash-commit job")
|
set(exception_matches FALSE)
|
||||||
endif()
|
foreach(exception IN LISTS configure_warning_exceptions)
|
||||||
|
if (${line} MATCHES "${exception}")
|
||||||
|
set(exception_matches TRUE)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if (NOT exception_matches)
|
||||||
|
message(FATAL_ERROR "Configure warnings detected, please check cdash-commit job: ${line}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# `compile_num_warnings` contains a single integer symbolizing the number of
|
# `compile_num_warnings` contains a single integer symbolizing the number of
|
||||||
|
Loading…
Reference in New Issue
Block a user