70 lines
2.1 KiB
CMake
70 lines
2.1 KiB
CMake
# - Top-level CMakeLists.txt for Geant4Py
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
#------------------------------------------------------------------------------
|
|
project(Geant4Py)
|
|
#------------------------------------------------------------------------------
|
|
# installation prefixes for libraries
|
|
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR})
|
|
|
|
# debug mode
|
|
set(DEBUG FALSE CACHE BOOL "Debug Mode (Debug On)")
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Do not edit below
|
|
#------------------------------------------------------------------------------
|
|
# cmake modules
|
|
set(CMAKE_MODULE_PATH
|
|
${PROJECT_SOURCE_DIR}/cmake/Modules
|
|
${CMAKE_MODULE_PATH})
|
|
|
|
include(SetInstallPath)
|
|
|
|
# searching packages...
|
|
find_package(Geant4 REQUIRED)
|
|
find_package(PythonInterp REQUIRED)
|
|
find_package(PythonLibs REQUIRED)
|
|
find_package(Boost 1.36.0)
|
|
find_package(XercesC)
|
|
find_package(ROOT)
|
|
|
|
#------------------------------------------------------------------------------
|
|
# parameters for building
|
|
message(STATUS "--------------------------------------------------------")
|
|
message(STATUS "Parameters for building")
|
|
|
|
# build options
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
if(DEBUG)
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
else()
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
endif()
|
|
endif()
|
|
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
|
message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
|
|
|
|
# compiler flags
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
set(CMAKE_CXX_FLAGS
|
|
"-Wwrite-strings -Wno-variadic-macros -Wno-long-long -ansi -pipe -ftemplate-depth-255 -finline-functions -fpermissive -DBOOST_PYTHON_DYNAMIC_LIB")
|
|
endif()
|
|
|
|
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
|
message(STATUS "--------------------------------------------------------")
|
|
|
|
#------------------------------------------------------------------------------
|
|
# add subdiretories...
|
|
|
|
# adding sub directories to the project
|
|
# libraries
|
|
add_subdirectory(source)
|
|
add_subdirectory(site-modules)
|
|
|
|
# examples
|
|
#add_subdirectory(examples EXCLUDE_FROM_ALL)
|
|
|
|
# tests
|
|
#add_subdirectory(tests EXCLUDE_FROM_ALL)
|