Commit c802a9f8 authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Merge branch 'bugfix/headercheck_exclsubdir' into 'master'

fix an issue when a subdir is not added in a CMakeLists.txt but headers are included in the check

See merge request !955
parents 8bc816b8 29b73f12
Pipeline #34955 passed with stage
in 7 minutes and 11 seconds
......@@ -40,6 +40,15 @@ macro(exclude_dir_from_headercheck)
exclude_from_headercheck(${list})
endmacro(exclude_dir_from_headercheck)
macro(exclude_subdir_from_headercheck DIRNAME)
file(GLOB_RECURSE exlist "${CMAKE_CURRENT_SOURCE_DIR}/${DIRNAME}/*.hh")
get_property(headerlist GLOBAL PROPERTY headercheck_list)
foreach(item ${exlist})
list(REMOVE_ITEM headerlist "${item}")
endforeach()
set_property(GLOBAL PROPERTY headercheck_list ${headerlist})
endmacro(exclude_subdir_from_headercheck)
macro(exclude_all_but_from_headercheck)
file(GLOB excllist RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.hh")
#make this robust to argument being passed with or without ""
......
......@@ -3,4 +3,6 @@ add_subdirectory(common)
# if Python bindings are enabled, include necessary sub directories.
if(DUNE_ENABLE_PYTHONBINDINGS)
add_subdirectory(python)
else()
exclude_subdir_from_headercheck(python)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment