Skip to content
Snippets Groups Projects
Commit 6209c3e0 authored by Markus Frank's avatar Markus Frank
Browse files

Avoid creating unconditionally rootmap files: Spped-up build process

parent c45225d7
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,12 @@ namespace DD4hep {
struct DDPythonGlobalState;
/** @class DDPython DDPython.h DDG4/DDPython.h */
/// Python interface class for callbacks and GIL.
/**
* \author M.Frank
* \version 1.0
* \ingroup DD4HEP_SIMULATION
*/
class DDPython {
private:
void* context;
......
......@@ -28,7 +28,7 @@ namespace DD4hep {
/**
* \author M.Frank
* \version 1.0
* \ingroup DD4HEP_SIMULATION
* \ingroup DD4HEP
*/
class Geant4PythonAction : public Geant4Action {
public:
......
......@@ -29,9 +29,9 @@ namespace DD4hep {
* Geant4PythonInitialization allows to configure python callbacks
* for the master and the worker thread setup using the calls:
*
* /// Set the Detector initialization command
* // Set the Detector initialization command
* void setMasterSetup(PyObject* callable, PyObject* args);
* /// Set the field initialization command
* // Set the field initialization command
* void setWorkerSetup(PyObject* callable, PyObject* args);
*
* or in python as a call sequence within the master thread:
......
......@@ -112,16 +112,23 @@ else()
endif()
set(libname ${CMAKE_SHARED_MODULE_PREFIX}${library}${CMAKE_SHARED_LIBRARY_SUFFIX})
message(STATUS "DD4hep_DIR = ${DD4hep_DIR}" )
add_custom_command(OUTPUT ${rootmapfile}
#message(STATUS "DD4hep_DIR = ${DD4hep_DIR}" )
add_custom_command(TARGET ${library}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -Dlibname=${libname} -Drootmapfile=${rootmapfile}
-Dgenmap_install_dir=${LIBRARY_OUTPUT_PATH}
-DROOT_VERSION_MAJOR=${ROOT_VERSION_MAJOR}
-DDD4hep_DIR=${DD4hep_DIR}
-P ${DD4hep_DIR}/cmake/MakeRootMap.cmake
DEPENDS ${library})
add_custom_target(${library}Rootmap ALL DEPENDS ${rootmapfile})
-P ${DD4hep_DIR}/cmake/MakeRootMap.cmake)
#add_custom_command(OUTPUT ${rootmapfile}
# COMMAND ${CMAKE_COMMAND} -Dlibname=${libname} -Drootmapfile=${rootmapfile}
# -Dgenmap_install_dir=${LIBRARY_OUTPUT_PATH}
# -DROOT_VERSION_MAJOR=${ROOT_VERSION_MAJOR}
# -DDD4hep_DIR=${DD4hep_DIR}
# -P ${DD4hep_DIR}/cmake/MakeRootMap.cmake
# DEPENDS ${library})
##add_custom_target(${library}Rootmap ALL DEPENDS ${rootmapfile})
install(FILES ${LIBRARY_OUTPUT_PATH}/${rootmapfile}
DESTINATION lib
......
message(STATUS "ROOT_genmap_CMD Root version: ${ROOT_VERSION_MAJOR} ${ROOT_VERSION}" )
message(STATUS " *** ROOT_genmap[Root version: ${ROOT_VERSION_MAJOR}]: Generate map for ${libname} ..." )
if( ${ROOT_VERSION_MAJOR} GREATER 5 )
#
# Running listcomponents from Gaudi
#
FIND_PROGRAM( ROOT_genmap_CMD listcomponents PATHS ${genmap_install_dir}/../bin ${DD4hep_DIR}/bin )
###MESSAGE( STATUS " *** MakeROOTMap ${genmap_install_dir}/../bin $ENV{DD4hep_DIR}/bin ${DD4hep_DIR}" )
MESSAGE( STATUS " *** MakeROOTMap[components].cmake run command : ${ROOT_genmap_CMD} -o ${rootmapfile} ${libname}
###MESSAGE( STATUS " *** MakeRootMap ${genmap_install_dir}/../bin $ENV{DD4hep_DIR}/bin ${DD4hep_DIR}" )
MESSAGE( STATUS " *** MakeRootMap[${ROOT_VERSION_MAJOR}].cmake run command : ${ROOT_genmap_CMD} -o ${rootmapfile} ${libname}
WORKING_DIRECTORY ${genmap_install_dir} "
)
if(APPLE)
......@@ -24,7 +24,7 @@ else()
# Running genmap from ROOT 5
#
FIND_PROGRAM( ROOT_genmap_CMD genmap PATHS $ENV{ROOTSYS}/bin $ENV{PATH} )
MESSAGE( STATUS " *** MakeROOTMap.cmake run command : ${ROOT_genmap_CMD} -debug -i ${libname} -o ${rootmapfile}
MESSAGE( STATUS " *** MakeRootMap[${ROOT_VERSION_MAJOR}].cmake run command : ${ROOT_genmap_CMD} -debug -i ${libname} -o ${rootmapfile}
WORKING_DIRECTORY ${genmap_install_dir} "
)
......
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