Commit 77098013 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Merge branch 'donttestgeneratedheaders' into 'master'

do not run public headers build test on generated headers

See merge request gaudi/Gaudi!974
parents 37e9f64c 370c22ec
......@@ -2731,6 +2731,11 @@ function(gaudi_install_headers)
# add special dummy library to test build of public headers
set(srcs)
foreach(hdr ${hdrs})
if(hdr MATCHES "^\.\./.*")
# This is most likely a generated header in the build
# area. These should not be subject to this test.
continue()
endif()
set(src ${CMAKE_CURRENT_BINARY_DIR}/${package}_test_public_headers/${hdr}.cpp)
get_filename_component(src_dir "${src}" DIRECTORY)
file(MAKE_DIRECTORY ${src_dir})
......@@ -2740,7 +2745,7 @@ function(gaudi_install_headers)
# avoid creating the target twice if gaudi_install_headers gets called twice
# (can happen if both gaudi_install_headers and gaudi_add_library get called)
# and warn user about the duplication
if(NOT TARGET ${library}_headers)
if(srcs AND NOT TARGET ${library}_headers)
add_custom_target(${library}_headers SOURCES ${hdrs})
add_library(test_public_headers_build_${library} STATIC EXCLUDE_FROM_ALL ${srcs})
# some headers are special and we need to do something special to compile
......
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