Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
geant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GeantV
geant
Commits
98c7dfbd
Commit
98c7dfbd
authored
10 years ago
by
Sandro Christian Wenzel
Browse files
Options
Downloads
Plain Diff
Merge branch 'swenzel/newfindvecgeom'
parents
24794d1d
2d555af3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-3
2 additions, 3 deletions
CMakeLists.txt
cmake/modules/FindVecGeom.cmake
+23
-33
23 additions, 33 deletions
cmake/modules/FindVecGeom.cmake
vecprot_v2/CMakeLists.txt
+2
-2
2 additions, 2 deletions
vecprot_v2/CMakeLists.txt
with
27 additions
and
38 deletions
CMakeLists.txt
+
2
−
3
View file @
98c7dfbd
...
@@ -43,12 +43,11 @@ find_package(VecGeom REQUIRED)
...
@@ -43,12 +43,11 @@ find_package(VecGeom REQUIRED)
if
(
VECGEOM_FOUND
)
if
(
VECGEOM_FOUND
)
find_package
(
Vc
)
find_package
(
Vc
)
if
(
VC_FOUND
)
if
(
VC_FOUND
)
include_directories
(
AFTER SYSTEM
${
VC_INCLUDE_DIR
}
)
include_directories
(
AFTER SYSTEM
${
VC_INCLUDE_DIR
}
)
endif
()
endif
()
if
(
USE_VECGEOM_NAVIGATOR
)
if
(
USE_VECGEOM_NAVIGATOR
)
add_definitions
(
"-DUSE_VECGEOM_NAVIGATOR"
)
add_definitions
(
"-DUSE_VECGEOM_NAVIGATOR"
)
endif
()
endif
()
add_definitions
(
"-DVECGEOM_ROOT"
)
include_directories
(
${
VECGEOM_INCLUDE_DIR
}
)
include_directories
(
${
VECGEOM_INCLUDE_DIR
}
)
else
()
else
()
message
(
FATAL_ERROR
"Required VecGeom library not found"
)
message
(
FATAL_ERROR
"Required VecGeom library not found"
)
...
@@ -155,7 +154,7 @@ include_directories("${PROJECT_SOURCE_DIR}/vecprot_v2/inc")
...
@@ -155,7 +154,7 @@ include_directories("${PROJECT_SOURCE_DIR}/vecprot_v2/inc")
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
/base/inc"
)
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
/base/inc"
)
# Work around VecCore not being its own project yet.
# Work around VecCore not being its own project yet.
include_directories
(
"
${
VECGEOM_IN
CLUDE_DIR
}
/VecCore"
)
include_directories
(
"
${
VECGEOM_IN
STALL_DIR
}
/include
/VecCore"
)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Add subdirectories
# Add subdirectories
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/FindVecGeom.cmake
+
23
−
33
View file @
98c7dfbd
# Finds VecGeom installation ( the vectorized geometry library )
# Locate the VecGeom library.
# This module sets up VecGeom information
#
# It defines:
# This file is meant to be copied into projects that want to use VecGeom. It will
# VECGEOM_FOUND If the library is found
# search for VecGeomConfig.cmake, which ships with VecGeom and which will provide
# VECGEOM_INCLUDE_DIR PATH to the include directory
# up-to-date buildsystem changes.
# VECGEOM_LIBRARIES Most common libraries
#
# VECGEOM_LIBRARY_DIR PATH to the library directory
# This module defines the following variables:
# VECGEOM_FOUND
# VECGEOM_INCLUDE_DIR
# VECGEOM_LIBRARIES
# VECGEOM_DEFINITIONS
# VECGEOM_VERSION_MAJOR # not yet
# VECGEOM_VERSION_MINOR # not yet
# VECGEOM_VERSION_PATCH # not yet
# VECGEOM_VERSION # not yet
# VECGEOM_VERSION_STRING # not yet
# VECGEOM_INSTALL_DIR
# VECGEOM_LIB_DIR
# VECGEOM_CMAKE_MODULES_DIR
#
# look if an environment variable VCROOT exists
find_package
(
VecGeom
${
VecGeom_FIND_VERSION
}
NO_MODULE PATHS $ENV{HOME} $ENV{VECGEOMROOT}
)
set
(
VECGEOMROOT $ENV{VECGEOMROOT}
)
find_library
(
VECGEOM_LIBRARIES libvecgeom.a PATHS
${
VECGEOMROOT
}
/lib
)
# find_library(USOLIDS_LIBRARIES libusolids.a PATHS ${VECGEOMROOT}/lib)
# if (VECGEOM_LIBRARIES AND USOLIDS_LIBRARIES)
if
(
VECGEOM_LIBRARIES
)
set
(
VECGEOM_FOUND TRUE
)
string
(
REPLACE
"/lib/libvecgeom.a"
""
VECGEOMROOT
${
VECGEOM_LIBRARIES
}
)
# set(VECGEOM_LIBRARIES ${VECGEOM_LIBRARIES} ${USOLIDS_LIBRARIES})
set
(
VECGEOM_INCLUDE_DIR
${
VECGEOMROOT
}
/include
)
set
(
VECGEOM_LIBRARY_DIR
${
VECGEOMROOT
}
/lib
)
if
(
CUDA
)
find_library
(
VECGEOM_CUDA_LIBRARY libvecgeomcuda.a PATHS
${
VECGEOMROOT
}
/lib
)
if
(
VECGEOM_CUDA_LIBRARY
)
SET
(
VECGEOM_LIBRARIES
${
VECGEOM_LIBRARIES
}
${
VECGEOM_CUDA_LIBRARY
}
)
endif
()
endif
()
message
(
STATUS
"Found VecGeom in
${
VECGEOMROOT
}
with
${
VECGEOM_LIBRARIES
}
"
)
message
(
STATUS
"VECGEOM_INCLUDE_DIR =
${
VECGEOM_INCLUDE_DIR
}
"
)
message
(
STATUS
"VECGEOM_LIBRARY_DIR =
${
VECGEOM_LIBRARY_DIR
}
"
)
else
()
message
(
STATUS
"VecGeom library not found; try to set a VECGEOMROOT environment variable to the base installation path or add -DVECGEOMROOT = to the cmake command"
)
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
VecGeom CONFIG_MODE
)
This diff is collapsed.
Click to expand it.
vecprot_v2/CMakeLists.txt
+
2
−
2
View file @
98c7dfbd
...
@@ -7,7 +7,7 @@ set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS "${GEANT5_COMPILE_DEFINITIONS}"
...
@@ -7,7 +7,7 @@ set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS "${GEANT5_COMPILE_DEFINITIONS}"
set
(
CMAKE_CXX_FLAGS
"
${
GEANT5_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
GEANT5_CXX_FLAGS
}
"
)
if
(
USE_VECGEOM_NAVIGATOR
)
if
(
USE_VECGEOM_NAVIGATOR
)
# Bug in VC (?), cannot compile without optimisation
# Bug in VC (?), cannot compile without optimisation
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
GEANT5_CXX_FLAGS_DEBUG
}
-O
1
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
GEANT5_CXX_FLAGS_DEBUG
}
-O
0
"
)
endif
()
endif
()
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"
${
GEANT5_CXX_FLAGS_MINSIZEREL
}
"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"
${
GEANT5_CXX_FLAGS_MINSIZEREL
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
GEANT5_CXX_FLAGS_RELEASE
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
GEANT5_CXX_FLAGS_RELEASE
}
"
)
...
@@ -77,7 +77,7 @@ add_library(Geant_v SHARED ${sources} G__Geant.cxx)
...
@@ -77,7 +77,7 @@ add_library(Geant_v SHARED ${sources} G__Geant.cxx)
if
(
VECGEOM_FOUND
)
if
(
VECGEOM_FOUND
)
target_link_libraries
(
Geant_v
${
ROOT_LIBRARIES
}
-lEG -lGeom
${
VECGEOM_LIBRARIES
}
${
VC_LIBRARIES
}
)
target_link_libraries
(
Geant_v
${
ROOT_LIBRARIES
}
-lEG -lGeom
${
VECGEOM_LIBRARIES
}
${
VC_LIBRARIES
}
)
# Bug in VC (?), cannot compile without optimisation
# Bug in VC (?), cannot compile without optimisation
#set(CMAKE_CXX_FLAGS_DEBUG "${GEANT5_CXX_FLAGS_DEBUG} -O
1
")
#set(CMAKE_CXX_FLAGS_DEBUG "${GEANT5_CXX_FLAGS_DEBUG} -O
0
")
else
()
else
()
target_link_libraries
(
Geant_v
${
ROOT_LIBRARIES
}
-lEG -lGeom
)
target_link_libraries
(
Geant_v
${
ROOT_LIBRARIES
}
-lEG -lGeom
)
endif
()
endif
()
...
...
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