From 2cce0e189df02c66f78a459a9a5a5d477f738c02 Mon Sep 17 00:00:00 2001 From: Gabriele Cosmo Date: Fri, 30 Jun 2017 11:12:01 +0200 Subject: [PATCH] Import Geant4 10.4.0.beta source tree --- cmake/Modules/CMakeMacroParseArguments.cmake | 138 - cmake/Modules/FindCLHEP.cmake | 355 -- cmake/Modules/Geant4BuildModes.cmake | 84 - cmake/Modules/Geant4BuildProjectConfig.cmake | 258 -- .../Modules/Geant4ConfigureConfigScript.cmake | 347 -- cmake/Modules/Geant4ConfigureModulefile.cmake | 95 - cmake/Modules/Geant4InstallDirs.cmake | 178 - cmake/Modules/Geant4LibraryBuildOptions.cmake | 366 -- cmake/Modules/Geant4MacroUtilities.cmake | 250 - ...Geant4ToolchainBackwardCompatibility.cmake | 895 ---- cmake/Modules/Geant4ValidateSources.cmake | 23 - cmake/Modules/MacroEnsureVersion.cmake | 243 - cmake/Modules/ResolveCompilerPaths.cmake | 107 - cmake/Templates/geant4-modulefile.in | 78 - examples/advanced/air_shower/G4History.macro | 2 - .../advanced/hadrontherapy/ModoulWeight.txt | 24 - .../experimentalData/iaeaBenchmark/400tdk.dat | 64 - .../experimentalData/iaeaBenchmark/B27.9.dat | 7 - .../experimentalData/iaeaBenchmark/Be27.9.dat | 8 - .../experimentalData/iaeaBenchmark/H27.9.dat | 7 - .../experimentalData/iaeaBenchmark/He27.9.dat | 7 - .../experimentalData/iaeaBenchmark/Li27.9.dat | 6 - .../iaeaBenchmark/alternativeGMBeamAD.dat | 7 - .../angularDistributions/15.9/B15.9.dat | 12 - .../angularDistributions/15.9/Be15.9.dat | 12 - .../angularDistributions/15.9/H15.9.dat | 14 - .../angularDistributions/15.9/He15.9.dat | 14 - .../angularDistributions/15.9/Li15.9.dat | 10 - .../angularDistributions/27.9/B27.9.dat | 7 - .../angularDistributions/27.9/Be27.9.dat | 8 - .../angularDistributions/27.9/H27.9.dat | 7 - .../angularDistributions/27.9/He27.9.dat | 7 - .../angularDistributions/27.9/Li27.9.dat | 6 - .../angularDistributions/31.2/B31.2.dat | 10 - .../angularDistributions/31.2/Be31.2.dat | 10 - .../angularDistributions/31.2/H31.2.dat | 10 - .../angularDistributions/31.2/He31.2.dat | 10 - .../angularDistributions/31.2/Li31.2.dat | 8 - .../angularDistributions/34.7/B34.7.dat | 8 - .../angularDistributions/34.7/Be34.7.dat | 8 - .../angularDistributions/34.7/H34.7.dat | 9 - .../angularDistributions/34.7/He34.7.dat | 9 - .../angularDistributions/34.7/Li34.7.dat | 6 - .../angularDistributions/5.9/B5.9.dat | 10 - .../angularDistributions/5.9/Be5.9.dat | 11 - .../angularDistributions/5.9/H5.9.dat | 7 - .../angularDistributions/5.9/He5.9.dat | 12 - .../angularDistributions/5.9/Li5.9.dat | 11 - .../fragmentEnergySpctra279mmWater0deg.dat | 17 - .../iaeaBenchmark/yields/TDKB.dat | 9 - .../iaeaBenchmark/yields/TDKBe.dat | 9 - .../iaeaBenchmark/yields/TDKH.dat | 8 - .../iaeaBenchmark/yields/TDKHe.dat | 8 - .../iaeaBenchmark/yields/TDKLi.dat | 9 - .../include/HadrontherapyAnalysisManager.hh | 227 - .../include/LocalIonIonInelasticPhysic.hh | 53 - .../src/HadrontherapyAnalysisManager.cc | 402 -- .../src/LocalIonIonInelasticPhysic.cc | 170 - .../channeling/data/si110_atd.txt | 3 - .../channeling/data/si110_efx.txt | 3 - .../channeling/data/si110_eld.txt | 3 - .../channeling/data/si110_neg_eld.txt | 513 --- .../channeling/data/si110_neg_nud.txt | 513 --- .../channeling/data/si110_pos_eld.txt | 513 --- .../channeling/data/si110_pos_nud.txt | 513 --- .../channeling/data/si110_pot.txt | 2050 --------- .../channeling/data/si111_atd.txt | 4098 ----------------- .../channeling/data/si111_efx.txt | 4098 ----------------- .../channeling/data/si111_eld.txt | 4098 ----------------- .../channeling/data/si111_neg_eld.txt | 4097 ---------------- .../channeling/data/si111_neg_nud.txt | 4097 ---------------- .../channeling/data/si111_pos_eld.txt | 4097 ---------------- .../channeling/data/si111_pos_nud.txt | 4097 ---------------- .../channeling/data/si111_pot.txt | 2050 --------- .../channeling/include/ExExChAnalysis.hh | 37 - .../include/ExExChAntiBarionBuilder.hh | 66 - .../include/ExExChDetectorConstruction.hh | 136 - .../ExExChDetectorConstructionMessenger.hh | 71 - .../channeling/include/ExExChEventAction.hh | 59 - .../include/ExExChHadronElasticPhysics.hh | 93 - .../include/ExExChHadronPhysicsQGSP_BIC.hh | 107 - .../include/ExExChHyperonFTFPBuilder.hh | 94 - .../channeling/include/ExExChIonPhysics.hh | 81 - .../include/ExExChParticleUserInfo.hh | 110 - .../include/ExExChPhysListEmStandardSS.hh | 64 - .../channeling/include/ExExChPhysicsList.hh | 80 - .../include/ExExChPhysicsListMessenger.hh | 63 - .../channeling/include/ExExChPiKBuilder.hh | 64 - .../include/ExExChPrimaryGeneratorAction.hh | 59 - .../include/ExExChProcessChanneling.hh | 194 - .../channeling/include/ExExChProtonBuilder.hh | 60 - .../channeling/include/ExExChRunAction.hh | 51 - .../include/ExExChSensitiveDetector.hh | 56 - .../include/ExExChSensitiveDetectorHit.hh | 114 - .../include/ExExChStackingAction.hh | 63 - .../include/ExExChStackingActionMessenger.hh | 61 - .../include/ExExChTrackingAction.hh | 55 - .../include/ExExChUserActionInitialization.hh | 60 - .../include/XCrystalCharacteristicArray.hh | 54 - .../include/XCrystalIntegratedDensityHub.hh | 86 - .../XCrystalIntegratedDensityPlanar.hh | 46 - .../XCrystalPlanarMoliereElectricField.hh | 50 - .../XCrystalPlanarMoliereElectronDensity.hh | 51 - .../include/XCrystalPlanarMolierePotential.hh | 53 - .../XCrystalPlanarMoliereTempPotential.hh | 54 - .../include/XCrystalPlanarNucleiDensity.hh | 48 - .../channeling/include/XLatticeManager3.hh | 65 - .../include/XLogicalAtomicLattice.hh | 72 - .../include/XLogicalAtomicLatticeDiamond.hh | 52 - .../XLogicalAtomicLatticeSingleAtom.hh | 52 - .../channeling/include/XLogicalBase.hh | 69 - .../channeling/include/XLogicalLattice.hh | 103 - .../channeling/include/XPhysicalLattice.hh | 124 - .../channeling/include/XUnitCell.hh | 97 - .../include/XVCrystalCharacteristic.hh | 86 - .../include/XVCrystalIntegratedDensity.hh | 103 - .../include/XVCrystalPlanarAnalytical.hh | 69 - .../XWrapperContinuousDiscreteProcess.hh | 170 - .../include/XWrapperDiscreteProcess.hh | 145 - .../channeling/src/ExExChAntiBarionBuilder.cc | 112 - .../src/ExExChDetectorConstruction.cc | 739 --- .../ExExChDetectorConstructionMessenger.cc | 212 - .../channeling/src/ExExChEventAction.cc | 138 - .../src/ExExChHadronElasticPhysics.cc | 261 -- .../src/ExExChHadronPhysicsQGSP_BIC.cc | 218 - .../src/ExExChHyperonFTFPBuilder.cc | 258 -- .../channeling/src/ExExChIonPhysics.cc | 172 - .../channeling/src/ExExChParticleUserInfo.cc | 175 - .../src/ExExChPhysListEmStandardSS.cc | 412 -- .../channeling/src/ExExChPhysicsList.cc | 245 - .../src/ExExChPhysicsListMessenger.cc | 103 - .../channeling/src/ExExChPiKBuilder.cc | 109 - .../src/ExExChPrimaryGeneratorAction.cc | 63 - .../channeling/src/ExExChProcessChanneling.cc | 1034 ----- .../channeling/src/ExExChProtonBuilder.cc | 67 - .../channeling/src/ExExChRunAction.cc | 86 - .../channeling/src/ExExChSensitiveDetector.cc | 97 - .../src/ExExChSensitiveDetectorHit.cc | 152 - .../channeling/src/ExExChStackingAction.cc | 75 - .../src/ExExChStackingActionMessenger.cc | 66 - .../channeling/src/ExExChTrackingAction.cc | 59 - .../src/ExExChUserActionInitialization.cc | 70 - .../src/XCrystalCharacteristicArray.cc | 84 - .../src/XCrystalIntegratedDensityHub.cc | 271 -- .../src/XCrystalIntegratedDensityPlanar.cc | 95 - .../src/XCrystalPlanarMoliereElectricField.cc | 83 - .../XCrystalPlanarMoliereElectronDensity.cc | 69 - .../src/XCrystalPlanarMolierePotential.cc | 105 - .../src/XCrystalPlanarMoliereTempPotential.cc | 125 - .../src/XCrystalPlanarNucleiDensity.cc | 56 - .../channeling/src/XLatticeManager3.cc | 152 - .../channeling/src/XLogicalAtomicLattice.cc | 117 - .../src/XLogicalAtomicLatticeDiamond.cc | 58 - .../XLogicalAtomicLatticeDiamondSingleAtom.cc | 51 - .../channeling/src/XLogicalBase.cc | 95 - .../channeling/src/XLogicalLattice.cc | 334 -- .../channeling/src/XPhysicalLattice.cc | 421 -- .../exoticphysics/channeling/src/XUnitCell.cc | 247 - .../channeling/src/XVCrystalCharacteristic.cc | 197 - .../src/XVCrystalIntegratedDensity.cc | 356 -- .../src/XVCrystalPlanarAnalytical.cc | 266 -- .../src/XWrapperContinousDiscreteProcess.cc | 405 -- .../channeling/src/XWrapperDiscreteProcess.cc | 350 -- .../exoticphysics/monopole/include/Histo.hh | 142 - .../monopole/include/HistoMessenger.hh | 72 - .../exoticphysics/monopole/src/Histo.cc | 354 -- .../monopole/src/HistoMessenger.cc | 123 - .../medical/GammaTherapy/include/Histo.hh | 182 - .../medical/GammaTherapy/src/Histo.cc | 490 -- examples/extended/medical/dna/range/range.out | 462 -- .../extended/medical/dna/svalue/svalue.out | 443 -- .../extended/medical/dna/wvalue/wvalue.out | 498 -- .../visualization/userVisAction/init.mac | 7 - .../solids/Boolean/include/G4UMultiUnion.hh | 105 - .../solids/Boolean/src/G4UMultiUnion.cc | 228 - .../specific/include/G4SurfaceVoxelizer.hh | 255 - .../specific/include/G4SurfaceVoxelizer.icc | 182 - .../solids/specific/src/G4SurfaceVoxelizer.cc | 1102 ----- .../include/G4ofstreamDestination.hh | 92 - .../management/src/G4ofstreamDestination.cc | 106 - .../builders/include/TheoModelFactory.hh | 53 - .../builders/src/G4VAlphaBuilder.cc | 46 - .../builders/src/G4VAntiBarionBuilder.cc | 45 - .../builders/src/G4VDeuteronBuilder.cc | 46 - .../builders/src/G4VHe3Builder.cc | 46 - .../builders/src/G4VKaonBuilder.cc | 45 - .../builders/src/G4VNeutronBuilder.cc | 45 - .../builders/src/G4VPiKBuilder.cc | 45 - .../builders/src/G4VPionBuilder.cc | 45 - .../builders/src/G4VProtonBuilder.cc | 45 - .../builders/src/G4VTritonBuilder.cc | 46 - .../dna/models/include/G4VDNAPTBModel.hh | 161 - .../dna/models/src/G4VDNAPTBModel.cc | 294 -- .../include/G4B9FermiFragment.hh | 60 - .../include/G4Be8FermiFragment.hh | 60 - .../fermi_breakup/include/G4FermiBreakUp.hh | 92 - .../include/G4FermiConfiguration.hh | 92 - .../include/G4FermiFragmentsPool.hh | 97 - .../include/G4He5FermiFragment.hh | 59 - .../include/G4Li5FermiFragment.hh | 59 - .../include/G4StableFermiFragment.hh | 61 - .../include/G4UnstableFermiFragment.hh | 68 - .../fermi_breakup/include/G4VFermiFragment.hh | 114 - .../fermi_breakup/src/G4B9FermiFragment.cc | 57 - .../fermi_breakup/src/G4Be8FermiFragment.cc | 55 - .../fermi_breakup/src/G4FermiBreakUp.cc | 272 -- .../fermi_breakup/src/G4FermiConfiguration.cc | 53 - .../fermi_breakup/src/G4FermiFragmentsPool.cc | 683 --- .../fermi_breakup/src/G4He5FermiFragment.cc | 54 - .../fermi_breakup/src/G4Li5FermiFragment.cc | 49 - .../src/G4StableFermiFragment.cc | 48 - .../src/G4UnstableFermiFragment.cc | 66 - .../fermi_breakup/src/G4VFermiFragment.cc | 49 - .../include/G4PolarizedGammaTransition.hh | 78 - .../src/G4PolarizedGammaTransition.cc | 61 - .../include/G4PomeronCrossSection.hh | 126 - .../management/src/G4PomeronCrossSection.cc | 326 -- source/processes/phonon/CMakeLists.txt | 18 - source/processes/phonon/GNUmakefile | 25 - source/processes/phonon/History | 95 - source/processes/phonon/README | 39 - .../phonon/include/G4LatticeManager.hh | 106 - .../phonon/include/G4LatticeReader.hh | 78 - .../phonon/include/G4PhononDownconversion.hh | 67 - .../phonon/include/G4PhononPolarization.hh | 46 - .../phonon/include/G4PhononReflection.hh | 66 - .../phonon/include/G4PhononScattering.hh | 63 - .../phonon/include/G4PhononTrackMap.hh | 74 - .../phonon/include/G4VPhononProcess.hh | 82 - source/processes/phonon/sources.cmake | 75 - .../processes/phonon/src/G4LatticeManager.cc | 293 -- .../processes/phonon/src/G4LatticeReader.cc | 248 - .../phonon/src/G4PhononDownconversion.cc | 265 -- .../phonon/src/G4PhononPolarization.cc | 55 - .../phonon/src/G4PhononReflection.cc | 120 - .../phonon/src/G4PhononScattering.cc | 105 - .../processes/phonon/src/G4PhononTrackMap.cc | 86 - .../processes/phonon/src/G4VPhononProcess.cc | 158 - 238 files changed, 62655 deletions(-) delete mode 100644 cmake/Modules/CMakeMacroParseArguments.cmake delete mode 100644 cmake/Modules/FindCLHEP.cmake delete mode 100644 cmake/Modules/Geant4BuildModes.cmake delete mode 100644 cmake/Modules/Geant4BuildProjectConfig.cmake delete mode 100644 cmake/Modules/Geant4ConfigureConfigScript.cmake delete mode 100644 cmake/Modules/Geant4ConfigureModulefile.cmake delete mode 100644 cmake/Modules/Geant4InstallDirs.cmake delete mode 100644 cmake/Modules/Geant4LibraryBuildOptions.cmake delete mode 100644 cmake/Modules/Geant4MacroUtilities.cmake delete mode 100644 cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake delete mode 100644 cmake/Modules/Geant4ValidateSources.cmake delete mode 100644 cmake/Modules/MacroEnsureVersion.cmake delete mode 100644 cmake/Modules/ResolveCompilerPaths.cmake delete mode 100644 cmake/Templates/geant4-modulefile.in delete mode 100644 examples/advanced/air_shower/G4History.macro delete mode 100644 examples/advanced/hadrontherapy/ModoulWeight.txt delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/400tdk.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/B27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/Be27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/H27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/He27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/Li27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/alternativeGMBeamAD.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/15.9/B15.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/15.9/Be15.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/15.9/H15.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/15.9/He15.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/15.9/Li15.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/27.9/B27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/27.9/Be27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/27.9/H27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/27.9/He27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/27.9/Li27.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/31.2/B31.2.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/31.2/Be31.2.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/31.2/H31.2.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/31.2/He31.2.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/31.2/Li31.2.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/34.7/B34.7.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/34.7/Be34.7.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/34.7/H34.7.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/34.7/He34.7.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/34.7/Li34.7.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/5.9/B5.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/5.9/Be5.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/5.9/H5.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/5.9/He5.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/angularDistributions/5.9/Li5.9.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/fragmentEnergySpctra279mmWater0deg.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/yields/TDKB.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/yields/TDKBe.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/yields/TDKH.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/yields/TDKHe.dat delete mode 100644 examples/advanced/hadrontherapy/experimentalData/iaeaBenchmark/yields/TDKLi.dat delete mode 100644 examples/advanced/hadrontherapy/include/HadrontherapyAnalysisManager.hh delete mode 100755 examples/advanced/hadrontherapy/include/LocalIonIonInelasticPhysic.hh delete mode 100644 examples/advanced/hadrontherapy/src/HadrontherapyAnalysisManager.cc delete mode 100755 examples/advanced/hadrontherapy/src/LocalIonIonInelasticPhysic.cc delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_atd.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_efx.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_neg_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_neg_nud.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_pos_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_pos_nud.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si110_pot.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_atd.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_efx.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_neg_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_neg_nud.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_pos_eld.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_pos_nud.txt delete mode 100644 examples/extended/exoticphysics/channeling/data/si111_pot.txt delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChAnalysis.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChAntiBarionBuilder.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChDetectorConstruction.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChDetectorConstructionMessenger.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChEventAction.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChHadronElasticPhysics.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChHadronPhysicsQGSP_BIC.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChHyperonFTFPBuilder.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChIonPhysics.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChParticleUserInfo.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChPhysListEmStandardSS.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChPhysicsList.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChPhysicsListMessenger.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChPiKBuilder.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChPrimaryGeneratorAction.hh delete mode 100755 examples/extended/exoticphysics/channeling/include/ExExChProcessChanneling.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChProtonBuilder.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChRunAction.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChSensitiveDetector.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChSensitiveDetectorHit.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChStackingAction.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/ExExChStackingActionMessenger.hh delete mode 100755 examples/extended/exoticphysics/channeling/include/ExExChTrackingAction.hh delete mode 100755 examples/extended/exoticphysics/channeling/include/ExExChUserActionInitialization.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalCharacteristicArray.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalIntegratedDensityHub.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalIntegratedDensityPlanar.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalPlanarMoliereElectricField.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalPlanarMoliereElectronDensity.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalPlanarMolierePotential.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalPlanarMoliereTempPotential.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XCrystalPlanarNucleiDensity.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLatticeManager3.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLogicalAtomicLattice.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLogicalAtomicLatticeDiamond.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLogicalAtomicLatticeSingleAtom.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLogicalBase.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XLogicalLattice.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XPhysicalLattice.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XUnitCell.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XVCrystalCharacteristic.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XVCrystalIntegratedDensity.hh delete mode 100644 examples/extended/exoticphysics/channeling/include/XVCrystalPlanarAnalytical.hh delete mode 100755 examples/extended/exoticphysics/channeling/include/XWrapperContinuousDiscreteProcess.hh delete mode 100755 examples/extended/exoticphysics/channeling/include/XWrapperDiscreteProcess.hh delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChAntiBarionBuilder.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChDetectorConstruction.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChDetectorConstructionMessenger.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChEventAction.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChHadronElasticPhysics.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChHadronPhysicsQGSP_BIC.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChHyperonFTFPBuilder.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChIonPhysics.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChParticleUserInfo.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChPhysListEmStandardSS.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChPhysicsList.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChPhysicsListMessenger.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChPiKBuilder.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChPrimaryGeneratorAction.cc delete mode 100755 examples/extended/exoticphysics/channeling/src/ExExChProcessChanneling.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChProtonBuilder.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChRunAction.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChSensitiveDetector.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChSensitiveDetectorHit.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChStackingAction.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/ExExChStackingActionMessenger.cc delete mode 100755 examples/extended/exoticphysics/channeling/src/ExExChTrackingAction.cc delete mode 100755 examples/extended/exoticphysics/channeling/src/ExExChUserActionInitialization.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalCharacteristicArray.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalIntegratedDensityHub.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalIntegratedDensityPlanar.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalPlanarMoliereElectricField.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalPlanarMoliereElectronDensity.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalPlanarMolierePotential.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalPlanarMoliereTempPotential.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XCrystalPlanarNucleiDensity.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLatticeManager3.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLogicalAtomicLattice.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLogicalAtomicLatticeDiamond.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLogicalAtomicLatticeDiamondSingleAtom.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLogicalBase.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XLogicalLattice.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XPhysicalLattice.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XUnitCell.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XVCrystalCharacteristic.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XVCrystalIntegratedDensity.cc delete mode 100644 examples/extended/exoticphysics/channeling/src/XVCrystalPlanarAnalytical.cc delete mode 100755 examples/extended/exoticphysics/channeling/src/XWrapperContinousDiscreteProcess.cc delete mode 100755 examples/extended/exoticphysics/channeling/src/XWrapperDiscreteProcess.cc delete mode 100644 examples/extended/exoticphysics/monopole/include/Histo.hh delete mode 100644 examples/extended/exoticphysics/monopole/include/HistoMessenger.hh delete mode 100644 examples/extended/exoticphysics/monopole/src/Histo.cc delete mode 100644 examples/extended/exoticphysics/monopole/src/HistoMessenger.cc delete mode 100644 examples/extended/medical/GammaTherapy/include/Histo.hh delete mode 100644 examples/extended/medical/GammaTherapy/src/Histo.cc delete mode 100644 examples/extended/medical/dna/range/range.out delete mode 100644 examples/extended/medical/dna/svalue/svalue.out delete mode 100644 examples/extended/medical/dna/wvalue/wvalue.out delete mode 100644 examples/extended/visualization/userVisAction/init.mac delete mode 100644 source/geometry/solids/Boolean/include/G4UMultiUnion.hh delete mode 100644 source/geometry/solids/Boolean/src/G4UMultiUnion.cc delete mode 100644 source/geometry/solids/specific/include/G4SurfaceVoxelizer.hh delete mode 100644 source/geometry/solids/specific/include/G4SurfaceVoxelizer.icc delete mode 100644 source/geometry/solids/specific/src/G4SurfaceVoxelizer.cc delete mode 100644 source/global/management/include/G4ofstreamDestination.hh delete mode 100644 source/global/management/src/G4ofstreamDestination.cc delete mode 100644 source/physics_lists/builders/include/TheoModelFactory.hh delete mode 100644 source/physics_lists/builders/src/G4VAlphaBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VAntiBarionBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VDeuteronBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VHe3Builder.cc delete mode 100644 source/physics_lists/builders/src/G4VKaonBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VNeutronBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VPiKBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VPionBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VProtonBuilder.cc delete mode 100644 source/physics_lists/builders/src/G4VTritonBuilder.cc delete mode 100644 source/processes/electromagnetic/dna/models/include/G4VDNAPTBModel.hh delete mode 100644 source/processes/electromagnetic/dna/models/src/G4VDNAPTBModel.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4B9FermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4Be8FermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4FermiBreakUp.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4FermiConfiguration.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4FermiFragmentsPool.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4He5FermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4Li5FermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4StableFermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4UnstableFermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4VFermiFragment.hh delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4B9FermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4Be8FermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4FermiBreakUp.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4FermiConfiguration.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4FermiFragmentsPool.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4He5FermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4Li5FermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4StableFermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4UnstableFermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/fermi_breakup/src/G4VFermiFragment.cc delete mode 100644 source/processes/hadronic/models/de_excitation/photon_evaporation/include/G4PolarizedGammaTransition.hh delete mode 100644 source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4PolarizedGammaTransition.cc delete mode 100644 source/processes/hadronic/models/parton_string/management/include/G4PomeronCrossSection.hh delete mode 100644 source/processes/hadronic/models/parton_string/management/src/G4PomeronCrossSection.cc delete mode 100644 source/processes/phonon/CMakeLists.txt delete mode 100644 source/processes/phonon/GNUmakefile delete mode 100644 source/processes/phonon/History delete mode 100644 source/processes/phonon/README delete mode 100644 source/processes/phonon/include/G4LatticeManager.hh delete mode 100644 source/processes/phonon/include/G4LatticeReader.hh delete mode 100644 source/processes/phonon/include/G4PhononDownconversion.hh delete mode 100644 source/processes/phonon/include/G4PhononPolarization.hh delete mode 100644 source/processes/phonon/include/G4PhononReflection.hh delete mode 100644 source/processes/phonon/include/G4PhononScattering.hh delete mode 100644 source/processes/phonon/include/G4PhononTrackMap.hh delete mode 100644 source/processes/phonon/include/G4VPhononProcess.hh delete mode 100644 source/processes/phonon/sources.cmake delete mode 100644 source/processes/phonon/src/G4LatticeManager.cc delete mode 100644 source/processes/phonon/src/G4LatticeReader.cc delete mode 100644 source/processes/phonon/src/G4PhononDownconversion.cc delete mode 100644 source/processes/phonon/src/G4PhononPolarization.cc delete mode 100644 source/processes/phonon/src/G4PhononReflection.cc delete mode 100644 source/processes/phonon/src/G4PhononScattering.cc delete mode 100644 source/processes/phonon/src/G4PhononTrackMap.cc delete mode 100644 source/processes/phonon/src/G4VPhononProcess.cc diff --git a/cmake/Modules/CMakeMacroParseArguments.cmake b/cmake/Modules/CMakeMacroParseArguments.cmake deleted file mode 100644 index 7ce4c49ae5..0000000000 --- a/cmake/Modules/CMakeMacroParseArguments.cmake +++ /dev/null @@ -1,138 +0,0 @@ -# CMAKE_PARSE_ARGUMENTS( args...) -# -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for -# parsing the arguments given to that macro or function. -# It processes the arguments and defines a set of variables which hold the -# values of the respective options. -# -# The argument contains all options for the respective macro, -# i.e. keywords which can be used when calling the macro without any value -# following, like e.g. the OPTIONAL keyword of the install() command. -# -# The argument contains all keywords for this macro -# which are followed by one value, like e.g. DESTINATION keyword of the -# install() command. -# -# The argument contains all keywords for this macro -# which can be followed by more than one value, like e.g. the TARGETS or -# FILES keywords of the install() command. -# -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the -# keywords listed in , and -# a variable composed of the given -# followed by "_" and the name of the respective keyword. -# These variables will then hold the respective value from the argument list. -# For the keywords this will be TRUE or FALSE. -# -# All remaining arguments are collected in a variable -# _UNPARSED_ARGUMENTS, this can be checked afterwards to see whether -# your macro was called with unrecognized parameters. -# -# As an example here a my_install() macro, which takes similar arguments as the -# real install() command: -# -# function(MY_INSTALL) -# set(options OPTIONAL FAST) -# set(oneValueArgs DESTINATION RENAME) -# set(multiValueArgs TARGETS CONFIGURATIONS) -# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) -# ... -# -# Assume my_install() has been called like this: -# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) -# -# After the cmake_parse_arguments() call the macro will have set the following -# variables: -# MY_INSTALL_OPTIONAL = TRUE -# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() -# MY_INSTALL_DESTINATION = "bin" -# MY_INSTALL_RENAME = "" (was not used) -# MY_INSTALL_TARGETS = "foo;bar" -# MY_INSTALL_CONFIGURATIONS = "" (was not used) -# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" -# -# You can the continue and process these variables. -# -# Keywords terminate lists of values, e.g. if directly after a one_value_keyword -# another recognized keyword follows, this is interpreted as the beginning of -# the new option. -# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in -# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would -# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. - -#============================================================================= -# Copyright 2010 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - - -if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) - return() -endif() -set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) - - -function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) - # first set all result variables to empty/FALSE - foreach(arg_name ${_singleArgNames} ${_multiArgNames}) - set(${prefix}_${arg_name}) - endforeach(arg_name) - - foreach(option ${_optionNames}) - set(${prefix}_${option} FALSE) - endforeach(option) - - set(${prefix}_UNPARSED_ARGUMENTS) - - set(insideValues FALSE) - set(currentArgName) - - # now iterate over all arguments and fill the result variables - foreach(currentArg ${ARGN}) - list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword - - if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) - if(insideValues) - if("${insideValues}" STREQUAL "SINGLE") - set(${prefix}_${currentArgName} ${currentArg}) - set(insideValues FALSE) - elseif("${insideValues}" STREQUAL "MULTI") - list(APPEND ${prefix}_${currentArgName} ${currentArg}) - endif() - else(insideValues) - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) - endif(insideValues) - else() - if(NOT ${optionIndex} EQUAL -1) - set(${prefix}_${currentArg} TRUE) - set(insideValues FALSE) - elseif(NOT ${singleArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "SINGLE") - elseif(NOT ${multiArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "MULTI") - endif() - endif() - - endforeach(currentArg) - - # propagate the result variables to the caller: - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) - endforeach(arg_name) - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) - -endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs) diff --git a/cmake/Modules/FindCLHEP.cmake b/cmake/Modules/FindCLHEP.cmake deleted file mode 100644 index 8b59f1c0ad..0000000000 --- a/cmake/Modules/FindCLHEP.cmake +++ /dev/null @@ -1,355 +0,0 @@ -# - Try to find the CLHEP High Energy Physics library and headers -# Usage of this module is as follows -# -# == Using any header-only components of CLHEP: == -# -# find_package( CLHEP 2.3.1.0 ) -# if(CLHEP_FOUND) -# include_directories(${CLHEP_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# endif() -# -# == Using the binary CLHEP library == -# -# find_package( CLHEP 2.3.1.0 ) -# if(CLHEP_FOUND) -# include_directories(${CLHEP_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# target_link_libraries(foo ${CLHEP_LIBRARIES}) -# endif() -# -# You can provide a minimum version number that should be used. -# If you provide this version number and specify the REQUIRED attribute, -# this module will fail if it can't find a CLHEP of the specified version -# or higher. If you further specify the EXACT attribute, then this module -# will fail if it can't find a CLHEP with a version eaxctly as specified. -# -# =========================================================================== -# Variables used by this module which can be used to change the default -# behaviour, and hence need to be set before calling find_package: -# -# CLHEP_ROOT_DIR The preferred installation prefix for searching for -# CLHEP. Set this if the module has problems finding -# the proper CLHEP installation. -# -# If you don't supply CLHEP_ROOT_DIR, the module will search on the standard -# system paths. On UNIX, the module will also try to find the clhep-config -# program in the PATH, and if found will use the prefix supplied by this -# program as a HINT on where to find the CLHEP headers and libraries. -# -# You can re-run CMake with a different version of CLHEP_ROOT_DIR to -# force a new search for CLHEP using the new version of CLHEP_ROOT_DIR. -# CLHEP_ROOT_DIR is cached and so can be editted in the CMake curses -# and GUI interfaces -# -# ============================================================================ -# Variables set by this module: -# -# CLHEP_FOUND System has CLHEP. -# -# CLHEP_INCLUDE_DIRS CLHEP include directories: not cached. -# -# CLHEP_LIBRARIES Link to these to use the CLHEP library: not cached. -# -# =========================================================================== -# If CLHEP is installed in a non-standard way, e.g. a non GNU-style install -# of /{lib,include}, then this module may fail to locate the headers -# and libraries as needed. In this case, the following cached variables can -# be editted to point to the correct locations. -# -# CLHEP_INCLUDE_DIR The path to the CLHEP include directory: cached -# -# CLHEP_LIBRARY The path to the CLHEP library: cached -# -# You should not need to set these in the vast majority of cases -# - -#============================================================================ -# Copyright (C) 2010,2011 Ben Morgan -# Copyright (C) 2010,2011 University of Warwick -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the University of Warwick nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -#============================================================================ - -#----------------------------------------------------------------------- -# Define library components for use if requested -# -set(CLHEP_COMPONENTS - Cast - Evaluator - Exceptions - GenericFunctions - Geometry - Matrix - Random - RandomObjects - RefCount - Vector - ) - -# - and their interdependencies (taken from CLHEP webpage, may not -# be totally up to date, but assumed to be complete -set(CLHEP_Geometry_REQUIRES Vector) -set(CLHEP_Matrix_REQUIRES Random Vector) -set(CLHEP_RandomObjects_REQUIRES Matrix Random Vector) -set(CLHEP_RefCount_REQUIRES Cast) -set(CLHEP_Exceptions_REQUIRES RefCount Cast) - -set(CLHEP_ROOT_DIR "${CLHEP_ROOT_DIR}" CACHE PATH "prefix of system CLHEP installation") - -#---------------------------------------------------------------------------- -# Enable re-search if known CLHEP_ROOT_DIR changes? -# -if(NOT "${CLHEP_ROOT_DIR}" STREQUAL "${CLHEP_INTERNAL_ROOT_DIR}") - if(CLHEP_INTERNAL_ROOT_DIR AND NOT CLHEP_FIND_QUIETLY) - message(STATUS "CLHEP_ROOT_DIR Changed, Rechecking for CLHEP") - endif() - - set(CLHEP_INTERNAL_ROOT_DIR ${CLHEP_ROOT_DIR} - CACHE INTERNAL "Last value supplied for where to locate CLHEP") - #set(CLHEP_INCLUDE_DIR CLHEP_INCLUDE_DIR-NOTFOUND) - #set(CLHEP_LIBRARY CLHEP_LIBRARY-NOTFOUND) - #foreach(__clhep_comp ${CLHEP_COMPONENTS}) - #set(CLHEP_${__clhep_comp}_LIBRARY CLHEP_${__clhep_comp}_LIBRARY-NOTFOUND) - #endforeach() - #set(CLHEP_CONFIG_EXECUTABLE CLHEP_CONFIG_EXECUTABLE-NOTFOUND) - unset(CLHEP_INCLUDE_DIR CACHE) - unset(CLHEP_LIBRARY CACHE) - foreach(__clhep_comp ${CLHEP_COMPONENTS}) - unset(CLHEP_${__clhep_comp}_LIBRARY CACHE) - endforeach() - unset(CLHEP_CONFIG_EXECUTABLE CACHE) - - - set(CLHEP_LIBRARIES ) - set(CLHEP_INCLUDE_DIRS ) - set(CLHEP_FOUND FALSE) -endif() - -#---------------------------------------------------------------------------- -# - If we already found CLHEP, be quiet -# -if(CLHEP_INCLUDE_DIR AND CLHEP_LIBRARY) - set(CLHEP_FIND_QUIETLY TRUE) -endif() - -#---------------------------------------------------------------------------- -# Set up HINTS on where to look for CLHEP -# If we're on UNIX, see if we can find clhep-config and use its --prefix -# as an extra hint. -# -set(_clhep_root_hints ${CLHEP_ROOT_DIR}) - -if(UNIX) - # Try and find clhep-config in the user's path, but hint at the bin - # directory under CLHEP_ROOT_DIR because we'd ideally like to pick up - # the config program that matches the libraries/headers. - # We only use it as a fallback though. - find_program(CLHEP_CONFIG_EXECUTABLE clhep-config - HINTS ${_clhep_root_hints}/bin - DOC "Path to CLHEP's clhep-config program") - mark_as_advanced(CLHEP_CONFIG_EXECUTABLE) - - if(CLHEP_CONFIG_EXECUTABLE) - execute_process(COMMAND ${CLHEP_CONFIG_EXECUTABLE} --prefix - OUTPUT_VARIABLE _clhep_config_prefix - OUTPUT_STRIP_TRAILING_WHITESPACE) - - list(APPEND _clhep_root_hints ${_clhep_config_prefix}) - endif() -elseif(WIN32 AND NOT UNIX) - # Do we need to set suitable defaults? -endif() - - -#---------------------------------------------------------------------------- -# Find the CLHEP headers -# Use Units/defs.h as locator as this is pretty consistent through versions -find_path(CLHEP_INCLUDE_DIR CLHEP/Units/defs.h - HINTS ${_clhep_root_hints} - PATH_SUFFIXES include - DOC "Path to the CLHEP headers" -) - -#---------------------------------------------------------------------------- -# Extract the CLHEP version from defs.h -# Versions COMPATIBLE if RequestedVersion > FoundVersion -# Also check if versions exact - -if(CLHEP_INCLUDE_DIR) - set(CLHEP_VERSION 0) - file(READ "${CLHEP_INCLUDE_DIR}/CLHEP/Units/defs.h" _CLHEP_DEFS_CONTENTS) - string(REGEX REPLACE ".*#define (PACKAGE|CLHEP_UNITS)+_VERSION \"([0-9.]+).*" "\\2" - CLHEP_VERSION "${_CLHEP_DEFS_CONTENTS}") - - if(NOT CLHEP_FIND_QUIETLY) - message(STATUS "Found CLHEP Version ${CLHEP_VERSION}") - endif() - - if(CLHEP_FIND_VERSION) - set(CLHEP_VERSIONING_TESTS CLHEP_VERSION_COMPATIBLE) - - if("${CLHEP_VERSION}" VERSION_LESS "${CLHEP_FIND_VERSION}") - set(CLHEP_VERSION_COMPATIBLE FALSE) - else() - set(CLHEP_VERSION_COMPATIBLE TRUE) - - if(CLHEP_FIND_VERSION_EXACT) - if("${CLHEP_VERSION}" VERSION_EQUAL "${CLHEP_FIND_VERSION}") - set(CLHEP_VERSION_EXACT TRUE) - endif() - list(APPEND CLHEP_VERSIONING_TESTS CLHEP_VERSION_EXACT) - endif() - endif() - endif() -endif() - -#---------------------------------------------------------------------------- -# Find the CLHEP library - AFTER version checking because CLHEP component -# libs are named including the version number -# Prefer lib64 if available. -set(__CLHEP_LIBRARY_SET) - -if(CLHEP_FIND_COMPONENTS) - # Resolve dependencies of requested components - set(CLHEP_RESOLVED_FIND_COMPONENTS) - - foreach(__clhep_comp ${CLHEP_FIND_COMPONENTS}) - list(APPEND CLHEP_RESOLVED_FIND_COMPONENTS ${__clhep_comp} ${CLHEP_${__clhep_comp}_REQUIRES}) - endforeach() - - list(REMOVE_DUPLICATES CLHEP_RESOLVED_FIND_COMPONENTS) - - foreach(__clhep_comp ${CLHEP_RESOLVED_FIND_COMPONENTS}) - find_library(CLHEP_${__clhep_comp}_LIBRARY CLHEP-${__clhep_comp}-${CLHEP_VERSION} - HINTS ${_clhep_root_hints} - PATH_SUFFIXES lib64 lib - DOC "Path to the CLHEP ${__clhep_comp} library" - ) - list(APPEND __CLHEP_LIBRARY_SET "CLHEP_${__clhep_comp}_LIBRARY") - endforeach() -else() - find_library(CLHEP_LIBRARY CLHEP - HINTS ${_clhep_root_hints} - PATH_SUFFIXES lib64 lib - DOC "Path to the CLHEP library" - ) - set(__CLHEP_LIBRARY_SET "CLHEP_LIBRARY") -endif() - -#---------------------------------------------------------------------------- -# Construct an error message for FPHSA -# -set(CLHEP_DEFAULT_MSG "Could NOT find CLHEP:\n") - -if(NOT CLHEP_INCLUDE_DIR) - set(CLHEP_DEFAULT_MSG "${CLHEP_DEFAULT_MSG}CLHEP Header Path Not Found\n") -endif() - -if(NOT CLHEP_FIND_COMPONENTS AND NOT CLHEP_LIBRARY) - set(CLHEP_DEFAULT_MSG "${CLHEP_DEFAULT_MSG}CLHEP Library Not Found\n") -endif() - -if(CLHEP_FIND_VERSION) - if(NOT CLHEP_VERSION_COMPATIBLE) - set(CLHEP_DEFAULT_MSG "${CLHEP_DEFAULT_MSG}Incompatible versions, ${CLHEP_VERSION}(found) < ${CLHEP_FIND_VERSION}(required)\n") - endif() - - if(CLHEP_FIND_VERSION_EXACT) - if(NOT CLHEP_VERSION_EXACT) - set(CLHEP_DEFAULT_MSG "${CLHEP_DEFAULT_MSG}Non-exact versions, ${CLHEP_VERSION}(found) != ${CLHEP_FIND_VERSION}(required)\n") - endif() - endif() -endif() - - -#---------------------------------------------------------------------------- -# Handle the QUIETLY and REQUIRED arguments, setting CLHEP_FOUND to TRUE if -# all listed variables are TRUE -# -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CLHEP - "${CLHEP_DEFAULT_MSG}" - ${__CLHEP_LIBRARY_SET} - CLHEP_INCLUDE_DIR - ${CLHEP_VERSIONING_TESTS} - ) - -#---------------------------------------------------------------------------- -# If we found CLHEP, set the needed non-cache variables -# -if(CLHEP_FOUND) - set(CLHEP_LIBRARIES) - foreach(__clhep_lib ${__CLHEP_LIBRARY_SET}) - list(APPEND CLHEP_LIBRARIES ${${__clhep_lib}}) - endforeach() - set(CLHEP_INCLUDE_DIRS ${CLHEP_INCLUDE_DIR}) - - # Create imported targets - foreach(__clhep_lib ${__CLHEP_LIBRARY_SET}) - # Construct imported target name - string(REPLACE "_LIBRARY" "" __clhep_imp_lib "${__clhep_lib}") - string(REPLACE "_" "::" __clhep_imp_lib "${__clhep_imp_lib}") - if(__clhep_imp_lib STREQUAL "CLHEP") - # Create both CLHEP and CLHEP::CLHEP targets - if(NOT TARGET CLHEP::CLHEP) - add_library(CLHEP::CLHEP UNKNOWN IMPORTED) - set_target_properties(CLHEP::CLHEP PROPERTIES - IMPORTED_LOCATION "${CLHEP_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CLHEP_INCLUDE_DIRS}" - ) - endif() - if(NOT TARGET CLHEP) - add_library(CLHEP UNKNOWN IMPORTED) - set_target_properties(CLHEP PROPERTIES - IMPORTED_LOCATION "${CLHEP_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CLHEP_INCLUDE_DIRS}" - ) - endif() - else() - # Have a component target - these are always namespaced - # Note that at present, link interfaces aren't created... - if(NOT TARGET ${__clhep_imp_lib}) - add_library(${__clhep_imp_lib} UNKNOWN IMPORTED) - set_target_properties(${__clhep_imp_lib} PROPERTIES - IMPORTED_LOCATION "${${__clhep_lib}}" - INTERFACE_INCLUDE_DIRECTORIES "${CLHEP_INCLUDE_DIRS}" - ) - endif() - endif() - endforeach() -endif() - -#---------------------------------------------------------------------------- -# Mark cache variables that can be adjusted as advanced -# -mark_as_advanced(CLHEP_INCLUDE_DIR CLHEP_LIBRARY) -foreach(__clhep_comp ${CLHEP_COMPONENTS}) - mark_as_advanced(CLHEP_${__clhep_comp}_LIBRARY) -endforeach() diff --git a/cmake/Modules/Geant4BuildModes.cmake b/cmake/Modules/Geant4BuildModes.cmake deleted file mode 100644 index a86a342e0a..0000000000 --- a/cmake/Modules/Geant4BuildModes.cmake +++ /dev/null @@ -1,84 +0,0 @@ -# - Add Geant4 specific build modes and additional flags -# -# This follows the guide on adding a new mode on the CMake wiki: -# -# http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_extend_the_build_modes_with_a_custom_made_one_.3F -# -# Geant4 supports the standard CMake build types/configurations of -# -# Release Debug MinSizeRel RelWithDebInfo -# -# In addition, two types specifically for development are added: -# -# TestRelease: -# For trial production and extended testing. It has verbose -# output, has debugging symbols, and adds definitions to allow FPE -# and physics conservation law testing where supported. -# -# Maintainer: -# For development of the toolkit. It adds debugging, and enables the use -# of library specific debugging via standardized definitions. -# -# Compiler flags specific to these build types are set in the cache, and -# the types are added to the CMAKE_BUILD_TYPE cache string and to -# CMAKE_CONFIGURATION_TYPES if appropriate to the build tool being used. -# - -#----------------------------------------------------------------------- -# Add TestRelease{Debug} Modes and cache init flags -# -set(CMAKE_CXX_FLAGS_TESTRELEASE "${CMAKE_CXX_FLAGS_TESTRELEASE_INIT}" - CACHE STRING "Flags used by the compiler during TestRelease builds" - ) - -#----------------------------------------------------------------------- -# Add Maintainer Mode -# -set(CMAKE_CXX_FLAGS_MAINTAINER "${CMAKE_CXX_FLAGS_MAINTAINER_INIT}" - CACHE STRING "Flags used by the compiler during Maintainer builds" - ) - -#----------------------------------------------------------------------- -# Mark all the additional mode flags as advanced because most users will -# never need to see them -mark_as_advanced( - CMAKE_CXX_FLAGS_TESTRELEASE - CMAKE_CXX_FLAGS_MAINTAINER - ) - -#----------------------------------------------------------------------- -# Add the new configuration types ONLY if the build tool supports multiple -# configurations -# -if(CMAKE_CONFIGURATION_TYPES) - list(APPEND CMAKE_CONFIGURATION_TYPES TestRelease) - list(APPEND CMAKE_CONFIGURATION_TYPES Maintainer) - list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES) - set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" - CACHE STRING "Geant4 configurations for multimode build tools" - FORCE - ) -endif() - -#----------------------------------------------------------------------- -# Update build type information ONLY for single mode build tools, adding -# default type if none has been set, but otherwise leaving value alone. -# NB: this doesn't allow "None" for the build type - would need something -# more sophiticated using an internal cache variable. -# Good enough for now! -# -if(NOT CMAKE_CONFIGURATION_TYPES) - if(NOT CMAKE_BUILD_TYPE) - # Default to a Release build if nothing else... - set(CMAKE_BUILD_TYPE Release - CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer." - FORCE - ) - else() - # Force to the cache, but use existing value. - set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" - CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer." - FORCE - ) - endif() -endif() diff --git a/cmake/Modules/Geant4BuildProjectConfig.cmake b/cmake/Modules/Geant4BuildProjectConfig.cmake deleted file mode 100644 index 5bcb729a42..0000000000 --- a/cmake/Modules/Geant4BuildProjectConfig.cmake +++ /dev/null @@ -1,258 +0,0 @@ -# - Build Geant4Config.cmake file and support scripts for build and install. -# - -#----------------------------------------------------------------------- -# Collect all global variables we need to export to the config files -# Do this here for now, later on we could collect them as we go. -# - -# Compiler flags (because user apps are a bit dependent on them...) -set(GEANT4_COMPILER_FLAG_HINTS "# -set(CMAKE_CXX_EXTENSIONS OFF) -set(Geant4_CXX_FLAGS \"${CMAKE_CXX_FLAGS} ${GEANT4_CXXSTD_FLAGS}\") -set(Geant4_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")") - -foreach(_mode DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) - set(GEANT4_COMPILER_FLAG_HINTS "${GEANT4_COMPILER_FLAG_HINTS} -set(Geant4_CXX_FLAGS_${_mode} \"${CMAKE_CXX_FLAGS_${_mode}}\")") -endforeach() - -if(NOT CMAKE_CONFIGURATION_TYPES) - set(GEANT4_COMPILER_FLAG_HINTS "${GEANT4_COMPILER_FLAG_HINTS} -set(Geant4_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")") -endif() - -# Core compile definitions... -set(GEANT4_CORE_DEFINITIONS ) - -# Third party includes (libraries *should* be handled by the imports) -set(GEANT4_THIRD_PARTY_INCLUDES ) - -# Imports of third party packages used with imported targets -set(GEANT4_THIRD_PARTY_IMPORT_SETUP ) - -# Externals libraries that may be present -set(GEANT4_EXTERNALS_TARGETS ) - -# - Stuff from Geant4LibraryBuildOptions.cmake -if(GEANT4_BUILD_STORE_TRAJECTORY) - list(APPEND GEANT4_CORE_DEFINITIONS -DG4_STORE_TRAJECTORY) -endif() - -if(GEANT4_BUILD_VERBOSE_CODE) - list(APPEND GEANT4_CORE_DEFINITIONS -DG4VERBOSE) -endif() - -# - Stuff from Geant4OptionalComponents.cmake -# - CLHEP -# If it's internal, add it to the externals list -if(NOT GEANT4_USE_SYSTEM_CLHEP) - list(APPEND GEANT4_EXTERNALS_TARGETS G4clhep) -endif() - -# - Expat -# If it's internal, add it to the externals list -if(NOT GEANT4_USE_SYSTEM_EXPAT) - list(APPEND GEANT4_EXTERNALS_TARGETS G4expat) -endif() - -# - ZLIB -# If it's internal, add it to the externals list -if(NOT GEANT4_USE_SYSTEM_ZLIB) - list(APPEND GEANT4_EXTERNALS_TARGETS G4zlib) -endif() - -# - GDML -# Need to include Xerces-C headers becuase these do appear in the public -# interface of GDML. The library should then be in the LINK_INTERFACE of -# persistency... -if(GEANT4_USE_GDML) - list(APPEND GEANT4_THIRD_PARTY_INCLUDES ${XERCESC_INCLUDE_DIRS}) -endif() - -# - USolids -# Compile definitions -if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS) - set(GEANT4_USE_USOLIDS_EITHER ON) - list(APPEND GEANT4_CORE_DEFINITIONS ${GEANT4_USOLIDS_COMPILE_DEFINITIONS}) - - # System USolids headers, because these do appear in Geant4's - # public interface. The library should be in the link interface - # of G4geometry (may need refinding) - list(APPEND GEANT4_THIRD_PARTY_INCLUDES ${USOLIDS_INCLUDE_DIRS}) -endif() - -# - Stuff from Geant4InterfaceOptions.cmake -if(GEANT4_USE_QT) - list(APPEND GEANT4_THIRD_PARTY_INCLUDES - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTOPENGL_INCLUDE_DIR} - ) - - # On WIN32, re-import the Qt targets. - if(WIN32) - set(GEANT4_QT4_IMPORT_SETUP " -# Qt reimport on WIN32 -set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE}) -set(QT_USE_IMPORTED_TARGETS ON) -find_package(Qt4 REQUIRED) - ") - endif() -endif() - -#----------------------------------------------------------------------- -# - Generate Build Tree Configuration Files -#----------------------------------------------------------------------- -# Set needed variables for the build tree -set(GEANT4_CMAKE_DIR "${PROJECT_BINARY_DIR}") - -# Set include path for build tree. This is always an absolute path, or -# rather paths. We extract the paths from the global -# GEANT4_BUILDTREE_INCLUDE_DIRS property and use this to create the -# header setup -# -get_property(__geant4_buildtree_include_dirs GLOBAL PROPERTY - GEANT4_BUILDTREE_INCLUDE_DIRS - ) - -set(GEANT4_INCLUDE_DIR_SETUP " -# Geant4 configured for use from the build tree - absolute paths are used. -set(Geant4_INCLUDE_DIR ${__geant4_buildtree_include_dirs}) -") - -set(GEANT4_MODULE_PATH_SETUP " -# Geant4 configured for use CMake modules from source tree -set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH}) -") - -# Geant4 data used in build tree -geant4_export_datasets(BUILD GEANT4_DATASET_DESCRIPTIONS) - -# Export targets from the build tree. We rely on the GEANT4_EXPORTED_TARGETS -# global property to list these for us. -# -get_property(__geant4_exported_targets GLOBAL PROPERTY GEANT4_EXPORTED_TARGETS) - -export(TARGETS ${__geant4_exported_targets} - FILE ${PROJECT_BINARY_DIR}/Geant4LibraryDepends.cmake - ) - -# Configure the build tree config file... -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4Config.cmake.in - ${PROJECT_BINARY_DIR}/Geant4Config.cmake - @ONLY - ) - -# Configure the build tree versioning file -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4ConfigVersion.cmake.in - ${PROJECT_BINARY_DIR}/Geant4ConfigVersion.cmake - @ONLY - ) - -# Copy the custom modules into the build tree -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Modules/CMakeMacroParseArguments.cmake - ${PROJECT_BINARY_DIR}/Modules/CMakeMacroParseArguments.cmake - COPYONLY - ) - -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Modules/IntelCompileFeatures.cmake - ${PROJECT_BINARY_DIR}/Modules/IntelCompileFeatures.cmake - COPYONLY - ) - -foreach(_mod AIDA CLHEP HepMC Pythia6 ROOT StatTest TBB) - configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Modules/Find${_mod}.cmake - ${PROJECT_BINARY_DIR}/Modules/Find${_mod}.cmake - COPYONLY - ) -endforeach() - -# Copy the Main and Internal Use file into the build tree -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake - ${PROJECT_BINARY_DIR}/UseGeant4.cmake - COPYONLY - ) - -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4_internal.cmake - ${PROJECT_BINARY_DIR}/UseGeant4_internal.cmake - COPYONLY - ) - -#----------------------------------------------------------------------- -# - Generate Install Tree Configuration Files -#----------------------------------------------------------------------- -# Set needed variables for the install tree -set(GEANT4_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}) - -# Header path for install tree is dependent on whether we have a relocatable -# install. -if(CMAKE_INSTALL_IS_NONRELOCATABLE) - # Use ABSOLUTE paths... - set(GEANT4_INCLUDE_DIR_SETUP " -# Geant4 configured for the install tree with absolute paths, so use these -set(Geant4_INCLUDE_DIR \"${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4\") - ") -else() - # Use RELATIVE paths... Where we measure relative to GEANT4_CMAKE_DIR - file(RELATIVE_PATH GEANT4_RELATIVE_HEADER_PATH - ${CMAKE_INSTALL_PREFIX}/${GEANT4_CMAKE_DIR} - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} - ) - - set(GEANT4_INCLUDE_DIR_SETUP " -# Geant4 configured for the install with relative paths, so use these -get_filename_component(Geant4_INCLUDE_DIR \"\${_geant4_thisdir}/${GEANT4_RELATIVE_HEADER_PATH}\" ABSOLUTE) - ") -endif() - -set(GEANT4_MODULE_PATH_SETUP) - -# Geant4 data used in install tree -geant4_export_datasets(INSTALL GEANT4_DATASET_DESCRIPTIONS) - -# Install exported targets file for the install tree - we just install -# the named export -install(EXPORT Geant4LibraryDepends - DESTINATION ${GEANT4_CMAKE_DIR} - COMPONENT Development - ) - -# Configure the install tree config file... -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4Config.cmake.in - ${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4Config.cmake - @ONLY - ) - -# Configure the install tree config versioning file... -configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4ConfigVersion.cmake.in - ${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4ConfigVersion.cmake - @ONLY - ) - -# Install the config, config versioning and use files -install(FILES - ${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4Config.cmake - ${PROJECT_BINARY_DIR}/InstallTreeFiles/Geant4ConfigVersion.cmake - ${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake - DESTINATION ${GEANT4_CMAKE_DIR} - COMPONENT Development - ) - -# Install the custom modules for the examples -install(DIRECTORY - ${PROJECT_BINARY_DIR}/Modules - DESTINATION ${GEANT4_CMAKE_DIR} - COMPONENT Development - ) - diff --git a/cmake/Modules/Geant4ConfigureConfigScript.cmake b/cmake/Modules/Geant4ConfigureConfigScript.cmake deleted file mode 100644 index ca6f6a2091..0000000000 --- a/cmake/Modules/Geant4ConfigureConfigScript.cmake +++ /dev/null @@ -1,347 +0,0 @@ -# - Script for configuring and installing geant4-config script -# -# The geant4-config script provides an sh based interface to provide -# information on the Geant4 installation, including installation prefix, -# version number, compiler and linker flags. -# -# The script is generated from a template file and then installed to the -# known bindir as an executable. -# -# Paths are always hardcoded in the build tree version as this is never -# intended to be relocatable. -# The Install Tree script uses self-location based on that in -# {root,clehep}-config is the install itself is relocatable, otherwise -# absolute paths are encoded. -# -# - -#----------------------------------------------------------------------- -# function get_system_include_dirs -# return list of directories our C++ compiler searches -# by default. -# -# The idea comes from CMake's inbuilt technique to do this -# for the Eclipse and CodeBlocks generators, but we implement -# our own function because the CMake functionality is internal -# so we can't rely on it. -function(get_system_include_dirs _dirs) - # Only for GCC, Clang and Intel - if("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel) - # Proceed - file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/g4dummy" "\n") - - # Save locale, them to "C" english locale so we can parse in English - set(_orig_lc_all $ENV{LC_ALL}) - set(_orig_lc_messages $ENV{LC_MESSAGES}) - set(_orig_lang $ENV{LANG}) - - set(ENV{LC_ALL} C) - set(ENV{LC_MESSAGES} C) - set(ENV{LANG} C) - - execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v -E -x c++ -dD g4dummy - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles - ERROR_VARIABLE _cxxOutput - OUTPUT_VARIABLE _cxxStdout - ) - - file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/g4dummy") - - # Parse and extract search dirs - set(_resultIncludeDirs ) - if( "${_cxxOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" ) - string(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}") - foreach(nextLine ${_includeLines}) - string(REGEX REPLACE "\\(framework directory\\)" "" nextLineNoFramework "${nextLine}") - string(STRIP "${nextLineNoFramework}" _includePath) - list(APPEND _resultIncludeDirs "${_includePath}") - endforeach() - endif() - - # Restore original locale - set(ENV{LC_ALL} ${_orig_lc_all}) - set(ENV{LC_MESSAGES} ${_orig_lc_messages}) - set(ENV{LANG} ${_orig_lang}) - - set(${_dirs} ${_resultIncludeDirs} PARENT_SCOPE) - else() - set(${_dirs} "" PARENT_SCOPE) - endif() -endfunction() - -#----------------------------------------------------------------------- -# Only create script if we have a global library build... -# -if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX) - # Get implicit search paths - get_system_include_dirs(_cxx_compiler_dirs) - - # Setup variables needed for expansion in configuration file - # - Static libs - if(BUILD_STATIC_LIBS) - set(G4_BUILTWITH_STATICLIBS "yes") - else() - set(G4_BUILTWITH_STATICLIBS "no") - endif() - - # - Multithreading - if(GEANT4_BUILD_MULTITHREADED) - set(G4_BUILTWITH_MULTITHREADING "yes") - else() - set(G4_BUILTWITH_MULTITHREADING "no") - endif() - - # - CLHEP - if(GEANT4_USE_SYSTEM_CLHEP) - set(G4_BUILTWITH_CLHEP "no") - #inc path - get_filename_component(G4_SYSTEM_CLHEP_INCLUDE_DIR "${CLHEP_INCLUDE_DIR}" ABSOLUTE) - - #libpath - list(GET CLHEP_LIBRARIES 0 _zeroth_clhep_lib) - get_target_property(_system_clhep_libdir "${_zeroth_clhep_lib}" LOCATION) - get_filename_component(_system_clhep_libdir "${_system_clhep_libdir}" REALPATH) - get_filename_component(_system_clhep_libdir "${_system_clhep_libdir}" DIRECTORY) - set(G4_SYSTEM_CLHEP_LIBRARIES "-L${_system_clhep_libdir}") - - foreach(_clhep_lib ${CLHEP_LIBRARIES}) - get_target_property(_curlib "${_clhep_lib}" LOCATION) - get_filename_component(_curlib "${_curlib}" NAME) - string(REGEX REPLACE "^lib(.*)\\.(so|a|dylib|lib|dll)$" "\\1" _curlib "${_curlib}") - set(G4_SYSTEM_CLHEP_LIBRARIES "${G4_SYSTEM_CLHEP_LIBRARIES} -l${_curlib}") - endforeach() - else() - set(G4_BUILTWITH_CLHEP "yes") - endif() - - # - EXPAT - if(GEANT4_USE_SYSTEM_EXPAT) - set(G4_BUILTWITH_EXPAT "no") - else() - set(G4_BUILTWITH_EXPAT "yes") - endif() - - # - ZLIB - if(GEANT4_USE_SYSTEM_ZLIB) - set(G4_BUILTWITH_ZLIB "no") - else() - set(G4_BUILTWITH_ZLIB "yes") - endif() - - # - GDML - if(GEANT4_USE_GDML) - set(G4_BUILTWITH_GDML "yes") - set(G4_XERCESC_INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS}) - list(REMOVE_DUPLICATES G4_XERCESC_INCLUDE_DIRS) - list(REMOVE_ITEM G4_XERCESC_INCLUDE_DIRS ${_cxx_compiler_dirs}) - - set(G4_XERCESC_CFLAGS ) - foreach(_dir ${G4_XERCESC_INCLUDE_DIRS}) - set(G4_XERCESC_CFLAGS "${G4_XERCESC_CFLAGS} -I${_dir}") - endforeach() - else() - set(G4_BUILTWITH_GDML "no") - endif() - - # - G3ToG4 - if(GEANT4_USE_G3TOG4) - set(G4_BUILTWITH_G3TOG4 "yes") - else() - set(G4_BUILTWITH_G3TOG4 "no") - endif() - - # - USolids - if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS) - set(G4_BUILTWITH_USOLIDS "yes") - set(G4_USOLIDS_INCLUDE_DIRS ${USOLIDS_INCLUDE_DIRS}) - list(REMOVE_DUPLICATES G4_USOLIDS_INCLUDE_DIRS) - list(REMOVE_ITEM G4_USOLIDS_INCLUDE_DIRS ${_cxx_compiler_dirs}) - - string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${GEANT4_USOLIDS_COMPILE_DEFINITIONS}") - foreach(_dir ${G4_USOLIDS_INCLUDE_DIRS}) - set(G4_USOLIDS_CFLAGS "${G4_USOLIDS_CFLAGS} -I${_dir}") - endforeach() - else() - set(G4_BUILTWITH_USOLIDS "no") - endif() - - # - Freetype - if(GEANT4_USE_FREETYPE) - set(G4_BUILTWITH_FREETYPE "yes") - else() - set(G4_BUILTWITH_FREETYPE "no") - endif() - - # - Qt - if(GEANT4_USE_QT) - set(G4_BUILTWITH_QT "yes") - if(QT4_FOUND) - set(G4_QT_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR}) - else() - set(G4_QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}) - endif() - - list(REMOVE_DUPLICATES G4_QT_INCLUDE_DIRS) - list(REMOVE_ITEM G4_QT_INCLUDE_DIRS ${_cxx_compiler_dirs}) - - set(G4_QT_CFLAGS ) - foreach(_dir ${G4_QT_INCLUDE_DIRS}) - set(G4_QT_CFLAGS "${G4_QT_CFLAGS} -I${_dir}") - endforeach() - - else() - set(G4_BUILTWITH_QT "no") - endif() - - # - Wt - if(GEANT4_USE_WT) - set(G4_BUILTWITH_WT "yes") - set(G4_WT_INCLUDE_DIRS ${Wt_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ) - - set(G4_WT_CFLAGS ) - foreach(_dir ${G4_WT_INCLUDE_DIRS}) - set(G4_WT_CFLAGS "${G4_WT_CFLAGS} -I${_dir}") - endforeach() - - else() - set(G4_BUILTWITH_WT "no") - endif() - - # - Motif - if(GEANT4_USE_XM) - set(G4_BUILTWITH_MOTIF "yes") - set(G4_CONFIG_NEEDS_X11 TRUE) - else() - set(G4_BUILTWITH_MOTIF "no") - endif() - - # - RayTracerX - if(GEANT4_USE_RAYTRACER_X11) - set(G4_BUILTWITH_RAYTRACERX11 "yes") - set(G4_CONFIG_NEEDS_X11 TRUE) - else() - set(G4_BUILTWITH_RAYTRACERX11 "no") - endif() - - # - OpenGL X11 - if(GEANT4_USE_OPENGL_X11) - set(G4_BUILTWITH_OPENGLX11 "yes") - set(G4_CONFIG_NEEDS_X11 TRUE) - else() - set(G4_BUILTWITH_OPENGLX11 "no") - endif() - - # - OpenInventor - if(GEANT4_USE_INVENTOR) - set(G4_BUILTWITH_INVENTOR "yes") - else() - set(G4_BUILTWITH_INVENTOR "no") - endif() - - # If we have a module that uses X11, We have to play with the X11 - # paths to get a clean set suitable for inclusion - if(G4_CONFIG_NEEDS_X11) - set(_raw_x11_includes ${X11_INCLUDE_DIR}) - list(REMOVE_DUPLICATES _raw_x11_includes) - list(REMOVE_ITEM _raw_x11_includes ${_cxx_compiler_dirs}) - set(G4_X11_CFLAGS ) - foreach(_p ${_raw_x11_includes}) - set(G4_X11_CFLAGS "-I${_p} ${G4_X11_CFLAGS}") - endforeach() - endif() - - # Configure the script - # - BUILD TREE - # Ouch, the include path will be LONG, but at least we always have - # absolute paths... - set(GEANT4_CONFIG_SELF_LOCATION "# BUILD TREE IS NON-RELOCATABLE") - set(GEANT4_CONFIG_INSTALL_PREFIX "${PROJECT_BINARY_DIR}") - set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\") - # NB: this only works for *single* mode generators. With multimode - # generators, which mode to use is not clear... - set(GEANT4_CONFIG_LIBDIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) - - get_property(__geant4_buildtree_include_dirs GLOBAL PROPERTY - GEANT4_BUILDTREE_INCLUDE_DIRS) - - foreach(_dir ${__geant4_buildtree_include_dirs}) - set(GEANT4_CONFIG_INCLUDE_DIRS "${GEANT4_CONFIG_INCLUDE_DIRS} \\ - ${_dir}") - endforeach() - - # - Data - geant4_export_datasets(BUILD GEANT4_CONFIG_DATASET_DESCRIPTIONS) - - # Configure the build tree script - # If we're on CMake 2.8 and above, we try to use file(COPY) to create an - # executable script - # Not sure if version check is o.k., but I'll be shocked if we ever see - # a CMake 2.7 in the wild... - if(${CMAKE_VERSION} VERSION_GREATER 2.7) - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config - @ONLY - ) - - file(COPY - ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config - DESTINATION ${PROJECT_BINARY_DIR} - FILE_PERMISSIONS - OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE - ) - else() - # Changing permissions is awkward, so just configure and document - # that you have to do 'sh geant4-config' in this case. - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in - ${PROJECT_BINARY_DIR}/geant4-config - @ONLY - ) - endif() - - # - Install Tree - # Much easier :-) - # Non-Relocatable case... - if(CMAKE_INSTALL_IS_NONRELOCATABLE) - # Hardcoded paths - set(GEANT4_CONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\") - set(GEANT4_CONFIG_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") - set(GEANT4_CONFIG_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4") - else() - # Calculate base of self contained install based on relative path from - # CMAKE_INSTALL_FULL_BINDIR to CMAKE_INSTALL_PREFIX. - file(RELATIVE_PATH _bin_to_prefix ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_PREFIX}) - # Strip any trailing path separators just for neatness. - string(REGEX REPLACE "[/\\]$" "" _bin_to_prefix "${_bin_to_prefix}") - - set(GEANT4_CONFIG_INSTALL_PREFIX "$scriptloc/${_bin_to_prefix}") - set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\") - set(GEANT4_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}") - set(GEANT4_CONFIG_INCLUDE_DIRS "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}/Geant4") - endif() - - # - Data - geant4_export_datasets(INSTALL GEANT4_CONFIG_DATASET_DESCRIPTIONS) - - # Configure the install tree script - configure_file( - ${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in - ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config - @ONLY - ) - - # Install it - install(FILES ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config - DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS - OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE - COMPONENT Development - ) -endif() - diff --git a/cmake/Modules/Geant4ConfigureModulefile.cmake b/cmake/Modules/Geant4ConfigureModulefile.cmake deleted file mode 100644 index 988afd3839..0000000000 --- a/cmake/Modules/Geant4ConfigureModulefile.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# - Script for configuring and installing a Modulefile for Geant4 -# -# Environment Modules is a standard tool for configuring the environment -# for a package in a shell/intepreter agnostic way. See: -# -# http://modules.sourceforge.net/ -# -# As with other Geant4 tool support, a template file is provided to -# generate the modulefile using the known build settings. Though -# modulefiles are generally only used for installed packages, modulefiles -# are generated for both the Build and Install Trees. -# -# The resultant modulefile for the Build Tree is only provided on an -# 'as is' basis. It is intended for Geant4 developers only, and is -# otherwise unsupported. -# -# The resultant modulefile for the Install Tree is installed to the -# share directory, though this is not intended to be its final location. -# System Admins may wish to move the file to their local modulefile path. -# Absolute paths to the install of Geant4 are used to help move the -# modulefile around, so if both modulefile and install of Geant4 are -# moved, the paths in the modulefile should be patched/sedded. -# - -macro(_geant4_prepare_modulefile_inputs) - cmake_parse_arguments(GPI - "" - "MODE" - "" - ${ARGN} - ) - - # - Paths - if("${GPI_MODE}" STREQUAL "INSTALL") - set(GEANT4_MODULEFILE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - set(GEANT4_MODULEFILE_INSTALL_BINDIR "${CMAKE_INSTALL_FULL_BINDIR}") - set(GEANT4_MODULEFILE_INSTALL_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") - geant4_export_datasets(INSTALL GEANT4_EXPORTED_DATASETS) - else() - set(GEANT4_MODULEFILE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}") - set(GEANT4_MODULEFILE_INSTALL_BINDIR "${PROJECT_BINARY_DIR}") - set(GEANT4_MODULEFILE_INSTALL_LIBDIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") - geant4_export_datasets(BUILD GEANT4_EXPORTED_DATASETS) - endif() - - # - Compatibility - if(APPLE) - set(DYNAMIC_LOADER_PATHNAME "DYLD_LIBRARY_PATH") - else() - set(DYNAMIC_LOADER_PATHNAME "LD_LIBRARY_PATH") - endif() - - # - Datasets - set(G4DATASET_TCLLIST) - foreach(_ds ${GEANT4_EXPORTED_DATASETS}) - # listify tuple - string(REPLACE "|" ";" _ds "${_ds}") - # Extract envar and path entries - list(GET _ds 1 _ds_ENVVAR) - list(GET _ds 2 _ds_PATH) - set(G4DATASET_TCLLIST "${G4DATASET_TCLLIST} ${_ds_ENVVAR} ${_ds_PATH}") - endforeach() -endmacro() - - -function(geant4_configure_modulefile) - # Install Tree - # - prepare configuration environment - _geant4_prepare_modulefile_inputs(MODE INSTALL) - - # - Configure the file - configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-modulefile.in - ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-${Geant4_VERSION} - @ONLY - ) - - # - Install it - install(FILES ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-${Geant4_VERSION} - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION} - COMPONENT Development - ) - - # Build Tree - # - prepare configuration environment - _geant4_prepare_modulefile_inputs() - - # - Configure the file - configure_file( - ${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-modulefile.in - ${PROJECT_BINARY_DIR}/geant4-${Geant4_VERSION} - @ONLY - ) -endfunction() - diff --git a/cmake/Modules/Geant4InstallDirs.cmake b/cmake/Modules/Geant4InstallDirs.cmake deleted file mode 100644 index 24babdf926..0000000000 --- a/cmake/Modules/Geant4InstallDirs.cmake +++ /dev/null @@ -1,178 +0,0 @@ -# - Define standard installation directories for Geant4 -# Provides install directory variables as defined for GNU software: -# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html -# Inclusion of this module defines the following variables: -# CMAKE_INSTALL_ - destination for files of a given type -# CMAKE_INSTALL_FULL_ - corresponding absolute path -# where is one of: -# BINDIR - user executables (bin) -# LIBDIR - object code libraries (lib or lib64) -# INCLUDEDIR - C header files (include) -# DATAROOTDIR - read-only architecture-independent data root (share) -# DATADIR - read-only architecture-independent data (DATAROOTDIR) -# MANDIR - man documentation (DATAROOTDIR/man) -# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) -# Each CMAKE_INSTALL_ value may be passed to the DESTINATION options -# of install() commands for the corresponding file type. If the includer -# does not define a value the above-shown default will be used and the -# value will appear in the cache for editing by the user. -# If any of these values are absolute paths, the install of Geant4 is -# regarded as non-relocatable, and the variable: -# CMAKE_INSTALL_IS_NONRELOCATABLE -# will be set. -# Each CMAKE_INSTALL_FULL_ value contains an absolute path constructed -# from the corresponding destination by prepending (if necessary) the value -# of CMAKE_INSTALL_PREFIX. - -#----------------------------------------------------------------------- -# Copyright 2011 Nikita Krupen'ko -# Copyright 2011 Kitware, Inc. -# -# CMake - Cross Platform Makefile Generator -# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of Kitware, Inc., the Insight Software Consortium, -# nor the names of their contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -#----------------------------------------------------------------------- -# -# The above copyright and license notice applies to distributions of -# CMake in source and binary form. Some source files contain additional -# notices of original copyright by their contributors; see each source -# for details. Third-party software packages supplied with CMake under -# compatible licenses provide their own copyright notices documented in -# corresponding subdirectories. -# -#----------------------------------------------------------------------- -# -# CMake was initially developed by Kitware with the following sponsorship: -# -# * National Library of Medicine at the National Institutes of Health -# as part of the Insight Segmentation and Registration Toolkit (ITK). -# -# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel -# Visualization Initiative. -# -# * National Alliance for Medical Image Computing (NAMIC) is funded by the -# National Institutes of Health through the NIH Roadmap for Medical Research, -# Grant U54 EB005149. -# -# * Kitware, Inc. -# -#----------------------------------------------------------------------- - -# Installation directories -# -if(NOT DEFINED CMAKE_INSTALL_BINDIR) - set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_LIBDIR) - set(_LIBDIR_DEFAULT "lib") - # Override this default 'lib' with 'lib64' iff: - # - we are on Linux system but NOT cross-compiling - # - we are NOT on debian - # - we are on a 64 bits system - # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf - # Note that the future of multi-arch handling may be even - # more complicated than that: http://wiki.debian.org/Multiarch - if(CMAKE_SYSTEM_NAME MATCHES "Linux" - AND NOT CMAKE_CROSSCOMPILING - AND NOT EXISTS "/etc/debian_version") - if(NOT DEFINED CMAKE_SIZEOF_VOID_P) - message(AUTHOR_WARNING - "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. " - "Please enable at least one language before including GNUInstallDirs.") - else() - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - set(_LIBDIR_DEFAULT "lib64") - endif() - endif() - endif() - set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})") -endif() - -if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) - set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR) - set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)") -endif() - -#----------------------------------------------------------------------- -# Values whose defaults are relative to DATAROOTDIR. -# Store empty values in the cache and store the defaults in local -# variables if the cache values are not set explicitly. This auto-updates -# the defaults as DATAROOTDIR changes. -# -if(NOT CMAKE_INSTALL_DATADIR) - set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)") - set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") -endif() - -if(NOT CMAKE_INSTALL_MANDIR) - set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") - set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") -endif() - -if(NOT CMAKE_INSTALL_DOCDIR) - set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") - set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}") -endif() - -mark_as_advanced( - CMAKE_INSTALL_BINDIR - CMAKE_INSTALL_LIBDIR - CMAKE_INSTALL_INCLUDEDIR - CMAKE_INSTALL_DATAROOTDIR - CMAKE_INSTALL_DATADIR - CMAKE_INSTALL_MANDIR - CMAKE_INSTALL_DOCDIR - ) - -# Result directories -# -foreach(dir - BINDIR - LIBDIR - INCLUDEDIR - DATAROOTDIR - DATADIR - MANDIR - DOCDIR - ) - if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}}) - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") - else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") - set(CMAKE_INSTALL_IS_NONRELOCATABLE 1) - endif() -endforeach() - diff --git a/cmake/Modules/Geant4LibraryBuildOptions.cmake b/cmake/Modules/Geant4LibraryBuildOptions.cmake deleted file mode 100644 index 3f5e97a18c..0000000000 --- a/cmake/Modules/Geant4LibraryBuildOptions.cmake +++ /dev/null @@ -1,366 +0,0 @@ -# - Setup of general build options for Geant4 Libraries -# -# In addition to the core compiler/linker flags (configured in the -# Geant4MakeRules_.cmake files) for Geant4, the build may require -# further configuration. This module performs this task whicj includes: -# -# 1) Extra build modes for developers -# 2) Additional compiler definitions to assist visualization or optimize -# performance. -# 3) Additional compiler flags which may be added optionally. -# 4) Whether to build shared and/or static libraries. -# 5) Whether to build libraries in global or granular format. -# -# - -#----------------------------------------------------------------------- -# Load needed modules -# -include(CheckCXXSourceCompiles) -include(IntelCompileFeatures) - -#----------------------------------------------------------------------- -# Set up Build types or configurations -# If further tuning of compiler flags is needed then it should be done here. -# (It can't be done in the make rules override section). -# However, exercise care when doing this not to override existing flags!! -# We don't do this on WIN32 platforms yet because of some teething issues -# with compiler specifics and linker flags -if(NOT WIN32) - include(Geant4BuildModes) -endif() - -#----------------------------------------------------------------------- -# Provide optional file level parallelization with MSVC compiler -# NB: This will only work if the build tool performs compilations -# with multiple sources, e.g. "cl.exe a.cc b.cc c.cc" -if(MSVC) - option(GEANT4_BUILD_MSVC_MP "Use /MP option with MSVC for file level parallel builds" OFF) - mark_as_advanced(GEANT4_BUILD_MSVC_MP) - - if(GEANT4_BUILD_MSVC_MP) - set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}") - endif() -endif() - -#----------------------------------------------------------------------- -# Configure/Select C++ Standard -# Require at least C++11 with no extensions and the following features -set(CMAKE_CXX_EXTENSIONS OFF) -set(GEANT4_TARGET_COMPILE_FEATURES - cxx_alias_templates - cxx_auto_type - cxx_delegating_constructors - cxx_enum_forward_declarations - cxx_explicit_conversions - cxx_final - cxx_lambdas - cxx_nullptr - cxx_override - cxx_range_for - cxx_strong_enums - cxx_uniform_initialization - # Features that MSVC 18.0 cannot support but in list of Geant4 coding - # guidelines - to be required once support for that compiler is dropped. - # Version 10.2 is coded without these being required. - #cxx_deleted_functions - #cxx_generalized_initializers - #cxx_constexpr - #cxx_inheriting_constructors - ) - -# - GEANT4_BUILD_CXXSTD -# Choose C++ Standard to build against from supported list. Allow user -# to supply it as a simple year or as 'c++XY'. If the latter, post process -# to remove the 'c++' -# Mark as advanced because most users will not need it -enum_option(GEANT4_BUILD_CXXSTD - DOC "C++ Standard to compile against" - VALUES 11 14 c++11 c++14 - CASE_INSENSITIVE - ) - -string(REGEX REPLACE "^c\\+\\+" "" GEANT4_BUILD_CXXSTD "${GEANT4_BUILD_CXXSTD}") -mark_as_advanced(GEANT4_BUILD_CXXSTD) -geant4_add_feature(GEANT4_BUILD_CXXSTD "Compiling against C++ Standard '${GEANT4_BUILD_CXXSTD}'") - -# If a standard higher than 11 has been selected, check that compiler has -# at least one feature from that standard and append these to the required -# feature list -if(GEANT4_BUILD_CXXSTD GREATER 11) - if(CMAKE_CXX${GEANT4_BUILD_CXXSTD}_COMPILE_FEATURES) - list(APPEND GEANT4_TARGET_COMPILE_FEATURES ${CMAKE_CXX${GEANT4_BUILD_CXXSTD}_COMPILE_FEATURES}) - else() - message(FATAL_ERROR "Geant4 requested to be compiled against C++ standard '${GEANT4_BUILD_CXXSTD}'\nbut detected compiler '${CMAKE_CXX_COMPILER_ID}', version '${CMAKE_CXX_COMPILER_VERSION}'\ndoes not support any features of that standard") - endif() -endif() - -# - Check for Standard Library Implementation Features -# Smart pointers are a library implementation feature -# Hashed containers are a library implementation feature -# Random numbers are a library implementation feature? -# - Thread local? Yes, though on AppleClang platforms, see this: - #http://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports -# An example of where a workaround is needed -# Rest of concurrency a library implementation feature - -# Add Definition to flags for temporary back compatibility -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11") - -# Hold any appropriate compile flag(s) in variable for later export to -# config files. Needed to support late CMake 2.8 where compile features -# are not available. -set(GEANT4_CXXSTD_FLAGS "${CMAKE_CXX${GEANT4_BUILD_CXXSTD}_STANDARD_COMPILE_OPTION}") - -#----------------------------------------------------------------------- -# Optional compiler definitions which are applicable globally -# -# - G4MULTITHREADED -# OFF by default. Switching on will enable multithreading, adding the -# G4MULTITHREADED definition globally and appending the relevant -# compiler flags to CMAKE_CXX_FLAGS -# Enabling the option allows advanced users to further select the -# thread local storage model if GNU/Clang/Intel compiler is used. -option(GEANT4_BUILD_MULTITHREADED "Enable multithreading in Geant4" OFF) - -if(WIN32) - mark_as_advanced(GEANT4_BUILD_MULTITHREADED) -endif() - -if(GEANT4_BUILD_MULTITHREADED) - # - Need Thread Local Storage support (POSIX) - if(UNIX) - check_cxx_source_compiles("__thread int i; int main(){return 0;}" HAVE_TLS) - if(NOT HAVE_TLS) - message(FATAL_ERROR "Configured compiler ${CMAKE_CXX_COMPILER} does not support thread local storage") - endif() - endif() - - # - Emit warning on Windows - message will format oddly on CMake prior - # to 2.8, but still print - if(WIN32) - message(WARNING "GEANT4_BUILD_MULTITHREADED IS NOT SUPPORTED on Win32. This option should only be activated by developers") - endif() - - # - Allow advanced users to select the thread local storage model, - # if the compiler supports it, defaulting to that recommended by Geant4 - if(TLSMODEL_IS_AVAILABLE) - enum_option(GEANT4_BUILD_TLS_MODEL - DOC "Build libraries with Thread Local Storage model" - VALUES ${TLSMODEL_IS_AVAILABLE} - CASE_INSENSITIVE - ) - mark_as_advanced(GEANT4_BUILD_TLS_MODEL) - geant4_add_feature(GEANT4_BUILD_TLS_MODEL "Building with TLS model '${GEANT4_BUILD_TLS_MODEL}'") - - set(GEANT4_MULTITHREADED_CXX_FLAGS "${GEANT4_MULTITHREADED_CXX_FLAGS} ${${GEANT4_BUILD_TLS_MODEL}_FLAGS}") - endif() - - # Set Defs/Compiler Flags - add_definitions(-DG4MULTITHREADED) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEANT4_MULTITHREADED_CXX_FLAGS}") -endif() - -geant4_add_feature(GEANT4_BUILD_MULTITHREADED "Build multithread enabled libraries") - -# - G4_STORE_TRAJECTORY -# ON by default, switching off can improve performance. Needs to be on -# for visualization to work fully. Mark as advanced because most users -# should not need to worry about it. -# FIXES : Bug #1208 -option(GEANT4_BUILD_STORE_TRAJECTORY - "Store trajectories in event processing. Switch off for improved performance but note that visualization of trajectories will not be possible" - ON) -mark_as_advanced(GEANT4_BUILD_STORE_TRAJECTORY) - -if(GEANT4_BUILD_STORE_TRAJECTORY) - add_definitions(-DG4_STORE_TRAJECTORY) -endif() - -# - G4VERBOSE -# ON by default, switching off can improve performance, but at the cost -# of fewer informational or warning messages. Mark as advanced because -# most users should not need to worry about it. -option(GEANT4_BUILD_VERBOSE_CODE - "Enable verbose output from Geant4 code. Switch off for better performance at the cost of fewer informational messages or warnings" - ON) -mark_as_advanced(GEANT4_BUILD_VERBOSE_CODE) - -if(GEANT4_BUILD_VERBOSE_CODE) - add_definitions(-DG4VERBOSE) -endif() - -#----------------------------------------------------------------------- -# Setup Library Format Option. -# Always build global libraries - always FATAL_ERROR if old -# granular library switch is set, e.g. from command line -if(GEANT4_BUILD_GRANULAR_LIBS) - message(FATAL_ERROR " Granular libraries are no longer supported!") -endif() - -#----------------------------------------------------------------------- -# Setup Shared and/or Static Library builds -# We name these options without a 'GEANT4_' prefix because they are -# really higher level CMake options. -# Default to building shared libraries, mark options as advanced because -# most user should not have to touch them. -option(BUILD_SHARED_LIBS "Build Geant4 shared libraries" ON) -option(BUILD_STATIC_LIBS "Build Geant4 static libraries" OFF) -mark_as_advanced(BUILD_SHARED_LIBS BUILD_STATIC_LIBS) - -# Because both could be switched off accidently, FATAL_ERROR if neither -# option has been selected. -if(NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS) - message(FATAL_ERROR "Neither static nor shared libraries will be built") -endif() - -# On WIN32, we need to build the genwindef application to create export -# def files for building DLLs. -# We only use it as a helper application at the moment so we exclude it from -# the ALL target. -# TODO: We could move this section into the Geant4MacroLibraryTargets.cmake -# if it can be protected so that the genwindef target wouldn't be defined -# more than once... Put it here for now... -if(WIN32) - # Assume the sources are co-located - get_filename_component(_genwindef_src_dir ${CMAKE_CURRENT_LIST_FILE} PATH) - add_executable(genwindef EXCLUDE_FROM_ALL - ${_genwindef_src_dir}/genwindef/genwindef.cpp - ${_genwindef_src_dir}/genwindef/LibSymbolInfo.h - ${_genwindef_src_dir}/genwindef/LibSymbolInfo.cpp) -endif() - -#------------------------------------------------------------------------ -# Setup symbol visibility (library interface) -# We need to define that we're building Geant4 -# - -#------------------------------------------------------------------------ -# Optional build of examples - only intended for testing -# -option(GEANT4_BUILD_EXAMPLES "Build all the examples of the project" OFF) -GEANT4_ADD_FEATURE(GEANT4_BUILD_EXAMPLES "Build all the examples of the project") -mark_as_advanced(GEANT4_BUILD_EXAMPLES) - - -#----------------------------------------------------------------------- -# Integration and unit tests -# - "ENABLE_TESTING" means all tests under tests/ -option(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project" OFF) -GEANT4_ADD_FEATURE(GEANT4_ENABLE_TESTING "Enable and define all the tests of the project") -mark_as_advanced(GEANT4_ENABLE_TESTING) - -# - "BUILD_TESTS" means all 'tests' in individual categories. -option(GEANT4_BUILD_TESTS "Build all the tests of the project" OFF) -GEANT4_ADD_FEATURE(GEANT4_BUILD_TESTS "Build all the tests of the project") -mark_as_advanced(GEANT4_BUILD_TESTS) - - -#------------------------------------------------------------------------ -# Setup Locations for Build Outputs -# Because of the highly nested structure of Geant4, targets will be -# distributed throughout this tree, potentially making usage and debugging -# difficult (especially if developers use non-CMake tools). -# -# We therefore set the output directory of runtime, library and archive -# targets to some low level directories under the build tree. -# -# On Unices, we try to make the output directory backward compatible -# with the old style 'SYSTEM-COMPILER' format so that applications may be -# built against the targets in the build tree. -# -# Note that for multi-configuration generators like VS and Xcode, these -# directories will have the configuration type (e.g. Debug) appended to -# them, so are not backward compatible with the old Make toolchain in -# these cases. -# -# Also, we only do this on UNIX because we want to avoid mixing static and -# dynamic libraries on windows until the differences are better understood. -#------------------------------------------------------------------------ -# Determine the backward compatible system name -# -if(NOT WIN32) - set(GEANT4_SYSTEM ${CMAKE_SYSTEM_NAME}) -else() - set(GEANT4_SYSTEM "WIN32") -endif() - -#------------------------------------------------------------------------ -# Determine the backward compatible compiler name -# NB: At present Clang detection only works on CMake > 2.8.1 -if(CMAKE_COMPILER_IS_GNUCXX) - set(GEANT4_COMPILER "g++") -elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") - set(GEANT4_COMPILER "clang") - - # - Newer g++ on OS X may identify as Clang - if(APPLE AND (CMAKE_CXX_COMPILER MATCHES ".*g\\+\\+")) - set(GEANT4_COMPILER "g++") - endif() - -elseif(MSVC) - set(GEANT4_COMPILER "VC") -elseif(CMAKE_CXX_COMPILER MATCHES "icpc.*|icc.*") - set(GEANT4_COMPILER "icc") -else() - set(GEANT4_COMPILER "UNSUPPORTED") -endif() - -#----------------------------------------------------------------------- -# Set the output paths to be backward compatible on UNIX -# - Check that install dirs have been defined as we want to match the -# output layout! -if((NOT DEFINED CMAKE_INSTALL_BINDIR) OR (NOT DEFINED CMAKE_INSTALL_LIBDIR)) - message(FATAL_ERROR "Cannot configure build output dirs as install directories have not yet been defined") -endif() - -# - Single root dir of all products -set(BASE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/BuildProducts") - -# - Default outputs for different products, will be used by single mode -# generators. Creates the structure: -# -# BuildProducts/ -# +- bin/ -# +- lib/ -# +- - -> symlink -> . -# -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_BINDIR}") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BASE_OUTPUT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}") - -# - Create libdir/softlink to fool geant4make, but only for single mode case -if(UNIX AND NOT CMAKE_CONFIGURATION_TYPES) - if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${GEANT4_SYSTEM}-${GEANT4_COMPILER}") - file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink . ${GEANT4_SYSTEM}-${GEANT4_COMPILER} - WORKING_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" - ) - endif() -endif() - -# - For multiconfig generators, we create the same structure once for each -# mode. Results in the structure: -# -# BuildProducts/ -# +- Release/ -# | +- bin/ -# | +- lib/ -# +- Debug/ -# | +- bin/ -# | +- lib/ -# | ... -# -foreach(_conftype ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER ${_conftype} _conftype_uppercase) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${_conftype_uppercase} - "${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_BINDIR}" - ) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${_conftype_uppercase} - "${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}" - ) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${_conftype_uppercase} - "${BASE_OUTPUT_DIRECTORY}/${_conftype}/${CMAKE_INSTALL_LIBDIR}" - ) -endforeach() - diff --git a/cmake/Modules/Geant4MacroUtilities.cmake b/cmake/Modules/Geant4MacroUtilities.cmake deleted file mode 100644 index 45ef891520..0000000000 --- a/cmake/Modules/Geant4MacroUtilities.cmake +++ /dev/null @@ -1,250 +0,0 @@ -# Geant4MacroUtilities - useful macros and functions for generic tasks -# -# CMake Extensions -# ---------------- -# macro set_ifnot( ) -# If variable var is not set, set its value to that provided -# -# function enum_option(