Changeset 19393 for trunk


Ignore:
Timestamp:
11/13/18 16:23:05 (6 years ago)
Author:
tbretz
Message:
Allow to select the default observatory location during compile time. Minor changes to the ordering.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r19379 r19393  
    201201ENDIF(NOT TOOLS_ONLY)
    202202
    203 # =========== Enable C++11 ===========
    204 
    205 SET(CMAKE_CXX_STANDARD 11)
    206 
    207 #ADD_DEFINITIONS(-D__CMAKE__)
    208 
    209 SET(CMAKE_CXX_FLAGS
    210         "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
    211          -Wcast-align -Wformat=2 -Woverloaded-virtual \
    212          -Wnon-virtual-dtor -Wshadow -Wno-unknown-pragmas") # -Wextra
    213 
    214 # -D__MARS__
    215 SET(CMAKE_CXX_FLAGS
    216         "${CMAKE_CXX_FLAGS} \
    217          -D_REENTRANT -D__LINUX__ \
    218          -DHAVE_ZLIB -DHAVE_ROOT -DHAVE_V8 -DHAVE_SQL -DHAVE_NOVA -DHAVE_FITS \
    219          -DMARSVER=\\\"${VERSION}\\\" \
    220          -DPACKAGE_VERSION=\\\"${VERSION}\\\" \
    221          -DREVISION=\\\"${REVISION}\\\" \
    222          -DPACKAGE_NAME=\\\"FACT++\\\" \
    223          -DPACKAGE_STRING=\\\"FACT++\\\" \
    224          -DPACKAGE_URL=\\\"${PACKAGE_URL}\\\" \
    225          -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\""
    226          )
    227 
    228 #         -DBOOST_DISABLE_ASSERTS \
    229 #         -DBOOST_NO_STD_LOCALE=1 \
    230 #         -DBOOST_REXEG_NO_FWD=1 \
    231 #         -DBOOST_NO_MEMBER_TEMPLATES=1 \
    232 #         -DBOOST_HAS_ABI_HEADERS=1 \
    233 
    234 # Flags required for Dim
    235 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux")
    236 
    237 
    238 # --------- ROOT -------------
     203# ============== ROOT ================
    239204
    240205FIND_PROGRAM(ROOTCONFIG_EXECUTABLE NAMES root-config)
     
    301266#                                    LINKDEF linkdef1 ...
    302267#                                    OPTIONS opt1...)
     268
     269# *********************************
     270# ********** Observatory **********
     271# *********************************
     272
     273SET(OBSERVATORY "ORM" CACHE STRING "Select the observatory location (ORM, HAWC, SPM, RWTH: see nova.h)")
     274
     275IF(NOT OBSERVATORY STREQUAL "ORM"  AND
     276   NOT OBSERVATORY STREQUAL "HAWC" AND
     277   NOT OBSERVATORY STREQUAL "SPM"  AND
     278   NOT OBSERVATORY STREQUAL "RWTH")
     279   MESSAGE(FATAL_ERROR "OBSERVATORY=${OBSERVATORY} invalid. Only ORM, HAWC, SPM and RWTH allowd!")
     280ENDIF()
     281
     282FIND_PACKAGE_MESSAGE(PresetObservatory "Preset Observatory: ${OBSERVATORY}" "[${OBSERVATORY}]")
     283
     284# *********************************
     285# *********** Compiler ************
     286# *********************************
     287
     288SET(CMAKE_CXX_STANDARD 11)
     289
     290#ADD_DEFINITIONS(-D__CMAKE__)
     291
     292SET(CMAKE_CXX_FLAGS
     293        "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
     294         -Wcast-align -Wformat=2 -Woverloaded-virtual \
     295         -Wnon-virtual-dtor -Wshadow -Wno-unknown-pragmas") # -Wextra
     296
     297# -D__MARS__
     298SET(CMAKE_CXX_FLAGS
     299        "${CMAKE_CXX_FLAGS} \
     300         -D_REENTRANT -D__LINUX__ \
     301         -DHAVE_ZLIB -DHAVE_ROOT -DHAVE_V8 -DHAVE_SQL -DHAVE_NOVA -DHAVE_FITS -DPRESET_OBSERVATORY=k${OBSERVATORY} \
     302         -DMARSVER=\\\"${VERSION}\\\" \
     303         -DPACKAGE_VERSION=\\\"${VERSION}\\\" \
     304         -DREVISION=\\\"${REVISION}\\\" \
     305         -DPACKAGE_NAME=\\\"FACT++\\\" \
     306         -DPACKAGE_STRING=\\\"FACT++\\\" \
     307         -DPACKAGE_URL=\\\"${PACKAGE_URL}\\\" \
     308         -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\""
     309         )
     310
     311#         -DBOOST_DISABLE_ASSERTS \
     312#         -DBOOST_NO_STD_LOCALE=1 \
     313#         -DBOOST_REXEG_NO_FWD=1 \
     314#         -DBOOST_NO_MEMBER_TEMPLATES=1 \
     315#         -DBOOST_HAS_ABI_HEADERS=1 \
     316
     317# Flags required for Dim
     318SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux")
     319
    303320
    304321# -------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.