Changeset 18991


Ignore:
Timestamp:
04/06/18 19:47:21 (7 years ago)
Author:
tbretz
Message:
Some more improvements, clang is not compatible in Release mode with boost on Ubuntu 16.04, default is Release mode now (86MB instead of 500MB)
File:
1 edited

Legend:

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

    r18990 r18991  
    88# Enable debug symbols by default
    99# must be done before project() statement
    10 IF (NOT CMAKE_BUILD_TYPE)
    11         SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
    12 ENDIF()
     10#IF (NOT CMAKE_BUILD_TYPE)
     11#       SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
     12#ENDIF()
    1313# (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release)
    1414
     
    1818# the cache is deleted
    1919
    20 IF (NOT DEFINED CMAKE_C_COMPILER)
    21         SET(CMAKE_C_COMPILER   "clang")#   CACHE STRING "Choose the compiler (c++, g++, clang++)" FORCE)
    22 ENDIF()
    23 
    24 IF (NOT DEFINED CMAKE_CXX_COMPILER)
    25         SET(CMAKE_CXX_COMPILER "clang++")# CACHE STRING "Choose the compiler (c++, g++, clang++)" FORCE)
    26 ENDIF()
     20# The version of clang is not compatible with boost::regex on Ubuntu 16.04 :(
     21
     22#IF (NOT DEFINED CMAKE_C_COMPILER)
     23#       SET(CMAKE_C_COMPILER   "clang")#   CACHE STRING "Choose the compiler (c++, g++, clang++)" FORCE)
     24#ENDIF()
     25#
     26#IF (NOT DEFINED CMAKE_CXX_COMPILER)
     27#       SET(CMAKE_CXX_COMPILER "clang++")# CACHE STRING "Choose the compiler (c++, g++, clang++)" FORCE)
     28#ENDIF()
    2729
    2830#SET(CMAKE_VERBOSE_MAKEFILE ON)
    29 
    30 # To check for an include file you do this:
    31 #CHECK_INCLUDE_FILE("stdint.h"        HAVE_STDINT_H)
    32 # To check the size of a primitive type:
    33 #CHECK_TYPE_SIZE("int"   SIZEOF_INT)
    3431
    3532
     
    9188SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
    9289
     90# FIXME: Need to check which package finders accept REQUIERED. For all others implement checks
     91
     92SET(CURSES_NEED_NCURSES ON)
     93FIND_PACKAGE(Curses   REQUIRED)  # CURSES_FOUND
     94# FIXME : Require  panel
     95
    9396FIND_PACKAGE(DBus)
    94 FIND_PACKAGE(Motif)
     97FIND_PACKAGE(Motif)              # MOTIF_FOUND
    9598FIND_PACKAGE(Nova     REQUIRED)
    9699FIND_PACKAGE(Readline REQUIRED)
    97 FIND_PACKAGE(GLUT)
    98 FIND_PACKAGE(Curses) # FIXME : Requires ncurses panel
    99 FIND_PACKAGE(ZLIB REQUIRED)     # ZLIB::ZLIB
    100 FIND_PACKAGE(Threads REQUIRED)  # Threads::Threads
    101 FIND_PACKAGE(OpenGL REQUIRED)   # OpenGL::GL OpenGL::GLU
     100FIND_PACKAGE(ZLIB     REQUIRED)  # ZLIB::ZLIB
     101FIND_PACKAGE(Threads  REQUIRED)  # Threads::Threads
     102FIND_PACKAGE(OpenGL   REQUIRED)  # OpenGL::GL OpenGL::GLU / OPENGL_FOUND OPENGL_GLU_FOUND
    102103
    103104INCLUDE_DIRECTORIES("/usr/include/mysql")
    104 #LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
     105
     106MESSAGE(${CURSES_LIBRARIES})
    105107
    106108
     
    114116        system
    115117        thread)
    116 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
    117 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
    118118
    119119# =============== QT4 ==============
     
    130130# QtCore QtSql QtOpenGL QtXml
    131131FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGL QtSql QtXml)
    132 INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
    133 INCLUDE_DIRECTORIES(${QT_QTGUI_INCLUDE_DIR})
    134 INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR})
    135 INCLUDE_DIRECTORIES(${QT_QTXML_INCLUDE_DIR})
    136 INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR})
    137 INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR})
    138 
    139 MESSAGE(${QT_INCLUDE_DIR})
    140 MESSAGE(${QT_QTGUI_INCLUDE_DIR})
    141 MESSAGE(${QT_QTSQL_INCLUDE_DIR})
    142 MESSAGE(${QT_QTXML_INCLUDE_DIR})
    143 MESSAGE(${QT_QTCORE_INCLUDE_DIR})
    144 MESSAGE(${QT_QTOPENGL_INCLUDE_DIR})
     132#INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
     133#INCLUDE_DIRECTORIES(${QT_QTGUI_INCLUDE_DIR})
     134#INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR})
     135#INCLUDE_DIRECTORIES(${QT_QTXML_INCLUDE_DIR})
     136#INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR})
     137#INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR})
     138
     139#MESSAGE(${QT_INCLUDE_DIR})
     140#MESSAGE(${QT_QTGUI_INCLUDE_DIR})
     141#MESSAGE(${QT_QTSQL_INCLUDE_DIR})
     142#MESSAGE(${QT_QTXML_INCLUDE_DIR})
     143#MESSAGE(${QT_QTCORE_INCLUDE_DIR})
     144#MESSAGE(${QT_QTOPENGL_INCLUDE_DIR})
    145145
    146146# dbus-1 dbus-glib-1
     
    169169        "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \
    170170         -Wcast-align -Wformat=2 -Woverloaded-virtual \
    171          -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra
     171         -Wnon-virtual-dtor -Wshadow") # -Wextra
    172172
    173173# FIXME: Move that to config.h.in
     
    185185         -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\""
    186186         )
     187
     188#         -DBOOST_DISABLE_ASSERTS \
     189#         -DBOOST_NO_STD_LOCALE=1 \
     190#         -DBOOST_REXEG_NO_FWD=1 \
     191#         -DBOOST_NO_MEMBER_TEMPLATES=1 \
     192#         -DBOOST_HAS_ABI_HEADERS=1 \
    187193
    188194# Flags required for Dim
     
    357363        src/Configuration.h src/Configuration.cc
    358364        src/FACT.h src/FACT.cc)
     365TARGET_LINK_LIBRARIES(Configuration
     366        Boost::regex
     367        Boost::system
     368        Boost::filesystem
     369        Boost::program_options)
    359370
    360371# ===================== libTime.so =======================
    361372ADD_LIBRARY(Time SHARED
    362373        src/Time.h src/Time.cc)
    363 TARGET_LINK_LIBRARIES(Time)# ${NOVA_LIBRARY})
     374#TARGET_LINK_LIBRARIES(Time)# ${NOVA_LIBRARY})
    364375
    365376# ===================== libTools.so ======================
     
    415426# ********************************************************
    416427
    417 SET(HELP++LIBS Tools Configuration Time ${Boost_LIBRARIES} mysqlpp mysqlclient)
     428SET(HELP++LIBS Tools Configuration Time mysqlpp mysqlclient)
    418429
    419430# --------------------------------------------------------
     
    471482
    472483ADD_EXECUTABLE(showlog src/showlog.cc src/WindowLog.cc)
    473 TARGET_LINK_LIBRARIES(showlog ${HELP++LIBS} ncurses)
     484TARGET_LINK_LIBRARIES(showlog Threads::Threads ${HELP++LIBS} ${CURSES_LIBRARIES})
    474485MANPAGE(showlog "")
    475486
     
    484495# ********************************************************
    485496
    486 SET(FACT++LIBS StateMachine Tools Configuration Time Dim++ Dim DimExtension
    487         ${Boost_LIBRARIES} mysqlpp readline ncurses panel) # HAVE_SQL
     497SET(FACT++LIBS
     498        StateMachine Tools Configuration Time Dim++ Dim DimExtension
     499        mysqlpp readline ${CURSES_LIBRARIES} panel Boost::thread) # HAVE_SQL
    488500
    489501# --------------------------------------------------------
     
    512524#TARGET_LINK_LIBRARIES(cosyctrl
    513525#       StateMachine Tools Configuration Time Dim++ Dim DimExtension
    514 #        ${Boost_LIBRARIES} readline ncurses)
     526#        ${Boost_LIBRARIES} readline ${CURSES_LIBRARIES})
    515527
    516528ADD_EXECUTABLE(datalogger src/datalogger.cc
     
    644656INCLUDE_DIRECTORIES(/usr/include/qwt-qt4 gui gui/RawEventsViewer)
    645657FILE(WRITE ${CMAKE_BINARY_DIR}/design.h "#include \"ui_design.h\"")
     658FILE(WRITE ${CMAKE_BINARY_DIR}/viewer.h "#include \"ui_viewer.h\"")
    646659
    647660# --------------------------------------------------------
     
    666679        ${Boost_LIBRARIES} Configuration mysqlpp
    667680        Qt4::QtGui Qt4::QtOpenGL
    668         GL GLU qwt-qt4 ZLIB::ZLIB)
     681        ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU
     682        qwt-qt4 ZLIB::ZLIB)
    669683
    670684# --------------------------------------------------------
     
    696710        ${ROOT_LIBRARIES}
    697711        Qt4::QtGui Qt4::QtOpenGL Qt4::QtSql
    698         GL GLU qwt-qt4 ZLIB::ZLIB)
     712        ${OPENGL_LIBRARIES} # OpenGL::GL OpenGL::GLU
     713        qwt-qt4 ZLIB::ZLIB)
    699714
    700715
     
    759774#       MANPAGE(psuctrl "")
    760775ENDIF()
     776
Note: See TracChangeset for help on using the changeset viewer.