Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Table of Contents

9.4.p03

G4 now builds with CMake

Windows Visual Studio 2008 (9)

  1. Download the source from the G4 website
  2. ungzip and untar the source using GNU's gzip and tar for windows
  3. Start up a DOS command window
  4. Run C:\Program Files\Microsoft Visual Studio 9\Common\Tools\vsvars32.bat
  5. Start up cmake-gui
  6. Point "Where is the source code" at the G4 source
  7. Create a separate build directory and point "Where to build binaries" at that location
  8. Click Configure - you will likely get errors
    Image Added
  9. Location of CLHEP needs to be set up
    1. Click "Add Entry"  CLHEP_INCLUDE_DIR, type "PATH", and point to the location of the include files.
    2. It is not clear if CLHEP_INCLUDE_DIRS is the new term, so I also define this as well.
    3. Click "Add Entry" CLHEP_LIBRARIES, type FilePATH and point to the actual CLHEP.lib file
    4. Do the same for CLHEP_LIBRARY as it is also not clear if this is needed as well.
    5. Click "Add Entry" and define CLHEP_ROOT_DIR as PATH
    6. Click "Add Entry" and define CLHEP_VERSION_OK as a BOOL and check it (this seems to be a bug, it seems we shouldn't have to do this)
    7. Click "Add Entry" and define GEANT4_USE_SYSTEM_CLHEP as BOOL and check 
    8. Click "Add Entry" and define CMAKE_INSTALL_PREFIX as PATH and point it to the location you desire for the G4 installed binaries.
    9. There doesn't seem to be a way to set G4VERBOSE or not via CMake
  10. Click Configure again
    1. actually looks like CLHEP_INCLUDE_DIR, CLHEP_LIBRARY, CLHEP_ROOT_DIR, and GEANT4_USE_SYSTEM_CLHEP are not needed
  11. Click Generate
  12. Open the solution file in Visual Studio
  13. Update all the static library projects to use /MDd for the multi-threaded debug library (there doesn't seem to be a way to set that via CMake in this version of G4)
    http://hypernews.slac.stanford.edu:5090/HyperNews/geant4/get/installconfig/1436/1.html
  14. Choose ALL_BUILD and build
  15. Choose Install and build

9.4.p01

The bug in 8.0.p01's G4ParticleDefinition.cc is fixed in 9.4, so no modification to the source is required.

...