Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
3e41fece
Commit
3e41fece
authored
5 years ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
DD4hepConfig: do not replace existing global variables (Geant4_DEFINITIONS, ROOT_CXX_FLAGS)
parent
0ee077b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/DD4hepBuild.cmake
+6
-7
6 additions, 7 deletions
cmake/DD4hepBuild.cmake
with
6 additions
and
7 deletions
cmake/DD4hepBuild.cmake
+
6
−
7
View file @
3e41fece
...
...
@@ -631,14 +631,14 @@ endfunction(dd4hep_add_plugin)
macro
(
DD4HEP_SETUP_ROOT_TARGETS
)
#ROOT CXX Flags are a string with quotes, not a list, so we need to convert to a list...
string
(
REPLACE
" "
";"
ROOT_CXX_FLAGS
${
ROOT_CXX_FLAGS
}
)
string
(
REPLACE
" "
";"
DD4HEP_
ROOT_CXX_FLAGS
${
ROOT_CXX_FLAGS
}
)
IF
(
NOT TARGET ROOT::Core
)
#in ROOT before 6.10 there is no ROOT namespace, so we create ROOT::Core ourselves
ADD_LIBRARY
(
ROOT::Core INTERFACE IMPORTED GLOBAL
)
SET_TARGET_PROPERTIES
(
ROOT::Core
PROPERTIES
INTERFACE_COMPILE_OPTIONS
"
${
ROOT_CXX_FLAGS
}
"
INTERFACE_COMPILE_OPTIONS
"
${
DD4HEP_
ROOT_CXX_FLAGS
}
"
INTERFACE_INCLUDE_DIRECTORIES
${
ROOT_INCLUDE_DIRS
}
)
# there is also no dependency between the targets
...
...
@@ -654,7 +654,7 @@ macro(DD4HEP_SETUP_ROOT_TARGETS)
ENDIF
(
NOT TARGET ROOT::Core
)
dd4hep_debug
(
"ROOT Libraries
${
ROOT_LIBRARIES
}
"
)
dd4hep_debug
(
"ROOT CXX_FLAGS
${
ROOT_CXX_FLAGS
}
"
)
dd4hep_debug
(
"ROOT CXX_FLAGS
${
DD4HEP_
ROOT_CXX_FLAGS
}
"
)
dd4hep_debug
(
"ROOT INCL DIRS
${
ROOT_INCLUDE_DIRS
}
"
)
dd4hep_debug
(
"ROOT_VERSION:
${
ROOT_VERSION
}
"
)
...
...
@@ -747,7 +747,6 @@ MACRO(DD4HEP_SETUP_GEANT4_TARGETS)
# Geant4 CXX Flags are a string with quotes, not a list, so we need to convert to a list...
# Geant4::10.2.2 at least, not in 10.5 (check where it switches)
string
(
REPLACE
" "
";"
Geant4_Flags
${
Geant4_CXX_FLAGS
}
${
Geant4_CXX_FLAGS_
${
CMAKE_BUILD_TYPE
}}
)
SET
(
Geant4_CXX_FLAGS
${
Geant4_Flags
}
)
#Geant4_DEFINITIONS already include -D, we jave to get rid of that so we can join things when creating dictionaries
SET
(
G4_DEF_TEMP
""
)
...
...
@@ -755,15 +754,15 @@ MACRO(DD4HEP_SETUP_GEANT4_TARGETS)
string
(
REPLACE
"-D"
""
def
${
def
}
)
LIST
(
APPEND G4_DEF_TEMP
${
def
}
)
endforeach
()
SET
(
Geant4_DEFINITIONS
${
G4_DEF_TEMP
}
)
SET
(
DD4HEP_
Geant4_DEFINITIONS
${
G4_DEF_TEMP
}
)
UNSET
(
G4_DEF_TEMP
)
ADD_LIBRARY
(
Geant4::Interface INTERFACE IMPORTED GLOBAL
)
SET_TARGET_PROPERTIES
(
Geant4::Interface
PROPERTIES
INTERFACE_COMPILE_OPTIONS
"
${
Geant4_
CXX_FLAGS
}
"
INTERFACE_COMPILE_DEFINITIONS
"
${
Geant4_DEFINITIONS
}
"
INTERFACE_COMPILE_OPTIONS
"
${
Geant4_
Flags
}
"
INTERFACE_COMPILE_DEFINITIONS
"
${
DD4HEP_
Geant4_DEFINITIONS
}
"
INTERFACE_INCLUDE_DIRECTORIES
"
${
Geant4_INCLUDE_DIRS
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment