Skip to content

Commit 9dc1422

Browse files
committed
fix(test): Fix template tests
Correct errors in the build system. Correct errors in the code.
1 parent 2229ccf commit 9dc1422

14 files changed

Lines changed: 34 additions & 11 deletions

File tree

cmake/modules/FairMacros.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ IF(FAIRROOT_FOUND)
343343
Set(SYSTEM_INCLUDE_DIRECTORIES
344344
${ROOT_INCLUDE_DIR}
345345
${Boost_INCLUDE_DIRS}
346+
${VMC_INCLUDE_DIRS}
346347
)
347348
Set(ROOT_INCLUDE_PATH
348349
${FAIRROOT_INCLUDE_DIR}

templates/project_root_containers/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ if(SIMPATH)
9494
endif()
9595

9696
find_package2(PUBLIC ROOT VERSION 6.10.00 REQUIRED)
97+
if(ROOT_vmc_FOUND)
98+
set(VMCLIB ROOT::VMC)
99+
else()
100+
find_package2(PUBLIC VMC REQUIRED)
101+
set(VMCLIB VMCLibrary)
102+
endif()
97103
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
98104
find_package2(PUBLIC Pythia6)
99105
find_package2(PUBLIC Pythia8)

templates/project_root_containers/MyProjData/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MyProjMCTrack.cxx
2525
Set(HEADERS )
2626
Set(LINKDEF MCStackLinkDef.h)
2727
Set(LIBRARY_NAME MyProjData)
28-
Set(DEPENDENCIES Base EG Physics Core)
28+
Set(DEPENDENCIES Base EG Physics Core ${VMCLIB} FairLogger)
2929

3030
GENERATE_LIBRARY()
3131

templates/project_root_containers/NewDetector/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ NewDetectorPoint.cxx
4040
Set(LINKDEF NewDetectorLinkDef.h)
4141
Set(LIBRARY_NAME NewDetector)
4242
Set(DEPENDENCIES
43+
MyProjData
4344
Base
45+
GeoBase
46+
ParBase
47+
Core
48+
${VMCLIB}
4449
)
4550

4651
GENERATE_LIBRARY()

templates/project_root_containers/NewDetector/NewDetector.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void NewDetector::Register()
149149
*/
150150

151151
if (!TVirtualMC::GetMC()->IsMT()) {
152-
GetRootManager().Register("NewDetectorPoint", "NewDetector", fNewDetectorPointCollection, kTRUE);
152+
FairRootManager::Instance()->Register("NewDetectorPoint", "NewDetector", fNewDetectorPointCollection, kTRUE);
153153
} else {
154154
FairRootManager::Instance()->RegisterAny("NewDetectorPoint", fNewDetectorPointCollection, kTRUE);
155155
}

templates/project_root_containers/field/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ set(LINKDEF FieldLinkDef.h)
2828
Set(LIBRARY_NAME Field)
2929
Set(DEPENDENCIES
3030
Base
31+
ParBase
32+
FairLogger
33+
Core
3134
)
3235

3336
GENERATE_LIBRARY()

templates/project_root_containers/passive/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ MyPassiveContFact.cxx
2929
Set(HEADERS )
3030
Set(LINKDEF PassiveLinkDef.h)
3131
Set(LIBRARY_NAME Passive)
32-
Set(DEPENDENCIES Base GeoBase ParBase Geom Core)
32+
Set(DEPENDENCIES Base GeoBase ParBase Geom Core FairLogger)
3333

3434
GENERATE_LIBRARY()

templates/project_stl_containers/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ if(SIMPATH)
9494
endif()
9595

9696
find_package2(PUBLIC ROOT VERSION 6.10.00 REQUIRED)
97+
if(ROOT_vmc_FOUND)
98+
set(VMCLIB ROOT::VMC)
99+
else()
100+
find_package2(PUBLIC VMC REQUIRED)
101+
set(VMCLIB VMCLibrary)
102+
endif()
97103
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
98104
find_package2(PUBLIC Pythia6)
99105
find_package2(PUBLIC Pythia8)

templates/project_stl_containers/MyProjData/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MyProjMCTrack.cxx
2525
Set(HEADERS )
2626
Set(LINKDEF MCStackLinkDef.h)
2727
Set(LIBRARY_NAME MyProjData)
28-
Set(DEPENDENCIES Base EG Physics Core)
28+
Set(DEPENDENCIES Base EG Physics Core ${VMCLIB} FairLogger)
2929

3030
GENERATE_LIBRARY()
3131

templates/project_stl_containers/NewDetector/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ NewDetectorPoint.cxx
4040
Set(LINKDEF NewDetectorLinkDef.h)
4141
Set(LIBRARY_NAME NewDetector)
4242
Set(DEPENDENCIES
43+
MyProjData
4344
Base
45+
GeoBase
46+
ParBase
47+
Core
48+
${VMCLIB}
4449
)
4550

4651
GENERATE_LIBRARY()

0 commit comments

Comments
 (0)