Changeset 19392 for trunk


Ignore:
Timestamp:
11/13/18 16:22:21 (6 years ago)
Author:
tbretz
Message:
Allow to select a different OBSERVATORY location during compile time. Minor changes to the order.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19354 r19392  
    9090FIND_PACKAGE(ZLIB REQUIRED)
    9191
    92 
    93 # =========== Enable C++11 ===========
    94 
    95 SET(CMAKE_CXX_STANDARD 11)
    96 SET(CMAKE_CXX_FLAGS
    97         "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
    98          -Wcast-align -Wformat -Woverloaded-virtual \
    99          -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra
    100 
    101 SET(CMAKE_CXX_FLAGS
    102         "${CMAKE_CXX_FLAGS} \
    103          -DMARSVER=\\\"1.0\\\" -D_REENTRANT -D__MARS__ -D__LINUX__ \
    104          -DPACKAGE_VERSION=\\\"1.0\\\" -DREVISION=\\\"1.0\\\" \
    105          -DPACKAGE_NAME=\\\"MARS\\\" -DHAVE_ZLIB")
    106 
    107 # --------- ROOT -------------
     92# ============== ROOT ================
    10893
    10994FIND_PROGRAM(ROOTCONFIG_EXECUTABLE NAMES root-config)
     
    165150#                                    LINKDEF linkdef1 ...
    166151#                                    OPTIONS opt1...)
     152
     153# *********************************
     154# ********** Observatory **********
     155# *********************************
     156
     157SET(OBSERVATORY "ORM" CACHE STRING "Select the observatory location (ORM, HAWC, SPM, RWTH: see nova.h)")
     158
     159IF(NOT OBSERVATORY STREQUAL "ORM"  AND
     160   NOT OBSERVATORY STREQUAL "HAWC" AND
     161   NOT OBSERVATORY STREQUAL "SPM"  AND
     162   NOT OBSERVATORY STREQUAL "RWTH")
     163   MESSAGE(FATAL_ERROR "OBSERVATORY=${OBSERVATORY} invalid. Only ORM, HAWC, SPM and RWTH allowd!")
     164ENDIF()
     165
     166FIND_PACKAGE_MESSAGE(PresetObservatory "Preset Observatory: ${OBSERVATORY}" "[${OBSERVATORY}]")
     167
     168
     169# *********************************
     170# *********** Compiler ************
     171# *********************************
     172
     173SET(CMAKE_CXX_STANDARD 11)
     174SET(CMAKE_CXX_FLAGS
     175        "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
     176         -Wcast-align -Wformat -Woverloaded-virtual \
     177         -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra
     178
     179SET(CMAKE_CXX_FLAGS
     180        "${CMAKE_CXX_FLAGS} \
     181         -DMARSVER=\\\"1.0\\\" -D_REENTRANT -D__MARS__ -D__LINUX__ \
     182         -DPACKAGE_VERSION=\\\"1.0\\\" -DREVISION=\\\"1.0\\\" \
     183         -DPACKAGE_NAME=\\\"MARS\\\" -DHAVE_ZLIB")
    167184
    168185CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/cmake/root.rc.in"     "${PROJECT_BINARY_DIR}/.rootrc")
Note: See TracChangeset for help on using the changeset viewer.