Warning, /geant4/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #-----------------------------------------------------------------------
0002 # - Top Level CMakeLists.txt for Geant4 Build
0003 #-----------------------------------------------------------------------
0004 # - Enforce an out-of-source builds before anything else
0005 #
0006 if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
0007 message(STATUS "Geant4 requires an out-of-source build.")
0008 message(STATUS "Please remove these files from ${CMAKE_CURRENT_BINARY_DIR} first:")
0009 message(STATUS "CMakeCache.txt")
0010 message(STATUS "CMakeFiles")
0011 message(STATUS "Once these files are removed, create a separate directory")
0012 message(STATUS "and run CMake from there")
0013 message(FATAL_ERROR "in-source build detected")
0014 endif()
0015
0016 #-----------------------------------------------------------------------
0017 # - Define CMake requirements and override make rules as needed
0018 #
0019 cmake_minimum_required(VERSION 3.16...3.27)
0020
0021 # - Make overrides for default flags, so they appear in interfaces
0022 set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/G4MakeRules_cxx.cmake)
0023
0024 #-----------------------------------------------------------------------
0025 # - Project definition and basic configuration
0026 # Version handled manually as project(... VERSION ...) is not used
0027 # in tests/examples which are subprojects. All calls must use
0028 # the same form.
0029 project(Geant4
0030 DESCRIPTION "C++ toolkit for simulating the passage of particles through matter"
0031 HOMEPAGE_URL "https://geant4.cern.ch")
0032 set(${PROJECT_NAME}_VERSION_MAJOR 11)
0033 set(${PROJECT_NAME}_VERSION_MINOR 3)
0034 set(${PROJECT_NAME}_VERSION_PATCH 0)
0035 set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
0036
0037 # - Prepend our own CMake Modules to the search path
0038 # NB: if our custom modules include others that we don't supply, those in
0039 # the base path will be used, so watch for incompatibilities!!
0040 #
0041 set(CMAKE_MODULE_PATH
0042 ${PROJECT_SOURCE_DIR}/cmake/Modules
0043 ${CMAKE_MODULE_PATH})
0044
0045 #-----------------------------------------------------------------------
0046 # - Include CMake category main module
0047 # Factored into category for convenience in tagging
0048 #
0049 include(G4CMakeMain)
0050