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
2600f237
Commit
2600f237
authored
9 years ago
by
Marko Petric
Browse files
Options
Downloads
Patches
Plain Diff
Use Geant4 FindCLHEP.cmake (undo Frank's commit)
parent
8688cf08
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+35
-35
35 additions, 35 deletions
CMakeLists.txt
with
35 additions
and
35 deletions
CMakeLists.txt
+
35
−
35
View file @
2600f237
...
@@ -67,41 +67,41 @@ add_subdirectory(DDSurfaces)
...
@@ -67,41 +67,41 @@ add_subdirectory(DDSurfaces)
add_subdirectory
(
DDRec
)
add_subdirectory
(
DDRec
)
add_subdirectory
(
DDDetectors
)
add_subdirectory
(
DDDetectors
)
#
fg: comment out this section as it seems to conflict with Geant4 10.02.p01 and CLHEP 2.3.1.1
fg: comment out this section as it seems to conflict with Geant4 10.02.p01 and CLHEP 2.3.1.1
#
if(DD4HEP_USE_GEANT4)
if
(
DD4HEP_USE_GEANT4
)
#
set ( DD4HEP_USE_CLHEP "OFF" )
set
(
DD4HEP_USE_CLHEP
"OFF"
)
#
#--- create a geant4 variables for the thisdd4hep.sh script
#--- create a geant4 variables for the thisdd4hep.sh script
#
find_package( Geant4 9.6 REQUIRED gdml ui_all vis_all)
find_package
(
Geant4 9.6 REQUIRED gdml ui_all vis_all
)
#
#
include(${Geant4_USE_FILE}) # this also takes care of geant 4 definitions and include dirs
include
(
${
Geant4_USE_FILE
}
)
# this also takes care of geant 4 definitions and include dirs
#
#
#----- if geant4 is build with external CLHEP we also need to export this fact
#----- if geant4 is build with external CLHEP we also need to export this fact
#
#
string(FIND "${Geant4_THIRD_PARTY_INCLUDE_DIRS}" "CLHEP" CLHEP_POS )
string
(
FIND
"
${
Geant4_THIRD_PARTY_INCLUDE_DIRS
}
"
"CLHEP"
CLHEP_POS
)
#
#
if( (NOT "${CLHEP_POS}" STREQUAL "-1") OR (NOT Geant4_builtin_clhep_FOUND) )
if
(
(
NOT
"
${
CLHEP_POS
}
"
STREQUAL
"-1"
)
OR
(
NOT Geant4_builtin_clhep_FOUND
)
)
#
set( GEANT4_USE_CLHEP 1 )
set
(
GEANT4_USE_CLHEP 1
)
#
get_filename_component(Geant4_ROOT "${Geant4_INCLUDE_DIR}/../../" ABSOLUTE)
get_filename_component
(
Geant4_ROOT
"
${
Geant4_INCLUDE_DIR
}
/../../"
ABSOLUTE
)
#
#---- use FindCLHEP shipped with geant4 -----------
#---- use FindCLHEP shipped with geant4 -----------
#
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${Geant4_ROOT}/cmake/Modules )
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
Geant4_ROOT
}
/cmake/Modules
)
#
#
if( CLHEP_DIR ) #---- use 'canonical' name -----
if
(
CLHEP_DIR
)
#---- use 'canonical' name -----
#
set( CLHEP_ROOT_DIR ${CLHEP_DIR} )
set
(
CLHEP_ROOT_DIR
${
CLHEP_DIR
}
)
#
endif()
endif
()
#
#
find_package( CLHEP REQUIRED )
find_package
(
CLHEP REQUIRED
)
#
include_directories( SYSTEM ${CLHEP_INCLUDE_DIRS} )
include_directories
(
SYSTEM
${
CLHEP_INCLUDE_DIRS
}
)
#
set ( DD4HEP_USE_CLHEP ON )
set
(
DD4HEP_USE_CLHEP ON
)
#
#
get_filename_component(CLHEP_LIBRARY_PATH "${CLHEP_LIBRARIES}" PATH)
get_filename_component
(
CLHEP_LIBRARY_PATH
"
${
CLHEP_LIBRARIES
}
"
PATH
)
#
message( STATUS " *** geant4 was build with external CLHEP *** CLHEP_LIBRARY_PATH = ${CLHEP_LIBRARY_PATH}" )
message
(
STATUS
" *** geant4 was build with external CLHEP *** CLHEP_LIBRARY_PATH =
${
CLHEP_LIBRARY_PATH
}
"
)
#
else()
else
()
#
set( GEANT4_USE_CLHEP 0 )
set
(
GEANT4_USE_CLHEP 0
)
#
endif()
endif
()
#
#
set(Geant4_INCLUDE_DIRS ${Geant4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS})
set
(
Geant4_INCLUDE_DIRS
${
Geant4_INCLUDE_DIRS
}
${
CLHEP_INCLUDE_DIRS
}
)
#
set(Geant4_LIBRARIES ${Geant4_LIBRARIES} ${CLHEP_LIBRARIES})
set
(
Geant4_LIBRARIES
${
Geant4_LIBRARIES
}
${
CLHEP_LIBRARIES
}
)
#
endif()
endif
()
#------- now configure DDG4 -------
#------- now configure DDG4 -------
add_subdirectory
(
DDG4
)
add_subdirectory
(
DDG4
)
...
...
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