From 1654127b0d7810d7b7dc1f83dc9bb2ad4b0b9084 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Wed, 16 Mar 2016 16:49:22 +0000 Subject: [PATCH] Fix dependency rules --- UtilityApps/CMakeLists.txt | 11 ++++++++--- cmake/DD4hepBuild.cmake | 7 +++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/UtilityApps/CMakeLists.txt b/UtilityApps/CMakeLists.txt index 88368cb92..9e1226388 100644 --- a/UtilityApps/CMakeLists.txt +++ b/UtilityApps/CMakeLists.txt @@ -29,22 +29,27 @@ dd4hep_add_executable(test_surfaces USES DDRec DDTest OPTIONAL [LCIO REQUIRED SOURCES src/test_surfaces.cpp]) #----------------------------------------------------------------------------------- -dd4hep_add_dictionary( G__teve +dd4hep_add_dictionary( G__teve SOURCES src/EvNavHandler.h LINKDEF src/LinkDef.h ) #----------------------------------------------------------------------------------- if ( ${DD4HEP_USE_LCIO} ) + dd4hep_add_dictionary( G__teve1 + SOURCES src/EvNavHandler.h + LINKDEF src/LinkDef.h ) dd4hep_add_executable( teveLCIO USES [ROOT REQUIRED COMPONENTS TEve] [LCIO REQUIRED] DDRec - SOURCES G__teve.cxx src/teve_display.cpp src/next_event_lcio.cpp + GENERATED G__teve1.cxx + SOURCES src/teve_display.cpp src/next_event_lcio.cpp ) endif() #----------------------------------------------------------------------------------- dd4hep_add_executable( teveDisplay USES [ROOT REQUIRED COMPONENTS TEve] DDRec - SOURCES src/teve_display.cpp src/next_event_dummy.cpp G__teve.cxx + GENERATED G__teve.cxx + SOURCES src/teve_display.cpp src/next_event_dummy.cpp ) diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 2737c07d6..7f71544b5 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -1106,7 +1106,7 @@ function ( dd4hep_add_executable binary ) set_source_files_properties( ${f} PROPERTIES COMPILE_FLAGS -Wno-unused-function GENERATED TRUE ) endforeach() # - set ( sources ${GENERATED} ${ARG_SOURCES} ${optional_sources} ) + set ( sources ${ARG_GENERATED} ${ARG_SOURCES} ${optional_sources} ) # if( NOT "${sources}" STREQUAL "") set (incs ${LOCAL_INCLUDE_DIRS} ${ARG_INCLUDE_DIRS} ) @@ -1148,7 +1148,7 @@ function( dd4hep_add_dictionary dictionary ) if ( "${enabled}" STREQUAL "OFF" ) dd4hep_skipmsg ( "${tag} DISBALED -- package is not built!" ) else() - cmake_parse_arguments(ARG "" "" "SOURCES;EXCLUDE;LINKDEF;OPTIONS;OPTIONAL" ${ARGN} ) + cmake_parse_arguments(ARG "" "" "SOURCES;EXCLUDE;LINKDEF;OPTIONS;OPTIONAL;INCLUDES" ${ARGN} ) dd4hep_print ( "|++> ${tag} Building dictionary ..." ) if("${ARG_LINKDEF}" STREQUAL "") set(ARG_LINKDEF "${CMAKE_SOURCE_DIR}/DDCore/include/ROOT/LinkDef.h") @@ -1184,6 +1184,9 @@ function( dd4hep_add_dictionary dictionary ) endforeach() # set ( inc_dirs -I${CMAKE_CURRENT_SOURCE_DIR}/include ) + foreach ( inc ${ARG_INCLUDES} ) + set ( inc_dirs ${inc_dirs} -I${inc} ) + endforeach() foreach ( inc ${incs} ) file ( GLOB inc ${inc} ) set ( inc_dirs ${inc_dirs} -I${inc} ) -- GitLab