Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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
  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 it
    8. Click "Add Entry" and define GEANT4_BUILD_VERBOSE_CODE, as a BOOL, and leave it unchecked
    9. Click "Add Entry" and define CMAKE_INSTALL_PREFIX as PATH and point it to the location of the G4 installed binaries.
  10. Click Configure again
    1. actually looks like CLHEP_INCLUDE_DIR, CLHEP_LIBRARY, CLHEP_ROOT_DIR, GEANT4_BUILD_VERBOSE_CODE and GEANT4_USE_SYSTEM_CLHEP are not needed

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.

...