Skip to content
Snippets Groups Projects
Commit 94274faf authored by Attila Krasznahorkay's avatar Attila Krasznahorkay Committed by Edward Moyse
Browse files

Added public compile definitions to TrigConfData.

Normally, when using an "offline build", those flags get set up project-wide.
But Point-1 projects only include the definitions of the exported targets,
without the use of the DetCommon project files. For such downstream projects
to work without hardcoding how they should use these exported targets, the
XAOD_STANDALONE and TRIGCONF_STANDALONE compiler flags are put explicitly
on the TrigConfData library.

Much of the rest of the DetCommon libraries (that care about these flags
anyway...) depend on TrigConfData, so I didn't add this anywhere else.
parent fbd6d7d5
No related branches found
No related tags found
No related merge requests found
......@@ -12,9 +12,17 @@ set( LCG_VERSION_NUMBER @LCG_VERSION_NUMBER@ CACHE STRING
set( LCG_COMPONENTS @LCG_COMPONENTS@ CACHE STRING
"LCG components to set up" )
# Find LCG.
# Set up a helper flag.
set( _quietFlag )
if( DetCommon_FIND_QUIETLY )
find_package( LCG ${LCG_VERSION_NUMBER} REQUIRED EXACT QUIET )
else()
find_package( LCG ${LCG_VERSION_NUMBER} REQUIRED EXACT )
set( _quietFlag QUIET )
endif()
# Find LCG.
find_package( LCG ${LCG_VERSION_NUMBER} REQUIRED EXACT ${_quietFlag} )
# Set up the Threads::Threads imported target.
find_package( Threads ${_quietFlag} )
# Clean up.
unset( _quietFlag )
......@@ -20,6 +20,18 @@ atlas_add_library ( TrigConfData
INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${extra_libs} CxxUtils )
# Put the TRIGCONF_STANDALONE and XAOD_STANDALONE compiler flags explicitly on
# the library. This is necessary for Point-1 projects to build against these
# libraries correctly. Since they don't call "find_package(DetCommon)"" for
# setting up these targets. :-( (Which would take care of globally setting up
# these compiler flags for all targets.)
if( TRIGCONF_STANDALONE )
target_compile_definitions( TrigConfData PUBLIC TRIGCONF_STANDALONE )
endif()
if( XAOD_STANDALONE )
target_compile_definitions( TrigConfData PUBLIC XAOD_STANDALONE )
endif()
# Tests in the package:
atlas_add_test( ConstIter SOURCES test/itertest.cxx
LINK_LIBRARIES TrigConfData
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment