Changeset 19010
- Timestamp:
- 04/27/18 20:29:14 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/CMakeLists.txt
r18957 r19010 1 # ------------ cmake -------------- 2 CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR) 1 # ********************************* 2 # ************ cmake ************** 3 # ********************************* 4 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 5 CMAKE_POLICY(SET CMP0043 NEW) 3 6 CMAKE_POLICY(SET CMP0048 NEW) 4 7 … … 10 13 # (you can also set it on the command line: -D CMAKE_BUILD_TYPE=Release) 11 14 12 # --------- Project -------------- 13 PROJECT(Mars VERSION 1.8.3.13) 14 15 # ------- For config.h.in -------- 16 SET(PACKAGE_MAINTAINER "Thomas Bretz") 17 SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de") 18 #SET(PACKAGE_URL "") 15 # Enable CLANG as default compilers, to change this use 16 # cmake -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++ 17 # Note that if compilers are switched on the fly, 18 # the cache is deleted 19 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() 19 27 20 28 #SET(CMAKE_VERBOSE_MAKEFILE ON) … … 25 33 #CHECK_TYPE_SIZE("int" SIZEOF_INT) 26 34 35 36 37 # ********************************* 38 # ************ Project ************ 39 # ********************************* 40 41 STRING(TIMESTAMP VERSION %y.%U.%w.%H UTC) 42 43 MESSAGE(STATUS "Mars V${VERSION}") 44 45 PROJECT(mars VERSION ${VERSION}) 46 47 INCLUDE(GNUInstallDirs) 48 49 # ======== For config.h.in ========= 50 SET(PACKAGE_MAINTAINER "Thomas Bretz") 51 SET(PACKAGE_BUGREPORT "tbretz@physik.rwth-aachen.de") 52 SET(PACKAGE_URL "https://git.rwth-aachen.de/tbretz/bd/wikis/home") 53 54 55 56 # ********************************* 57 # ********* Requirements ********** 58 # ********************************* 59 60 # =========== help2man ============ 61 FIND_PROGRAM(HELP2MAN_EXECUTABLE help2man) 62 27 63 # =========== pkg-config ============ 28 64 FIND_PACKAGE(PkgConfig) … … 62 98 SET(CMAKE_CXX_FLAGS 63 99 "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \ 64 -Wcast-align -Wformat =1-Woverloaded-virtual \100 -Wcast-align -Wformat -Woverloaded-virtual \ 65 101 -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra 66 102 … … 206 242 OPTIONS -p -D__MARS__ -DHAVE_ZLIB) 207 243 208 ADD_LIBRARY(mars SHARED dictionary/MARS.cxx) 209 TARGET_LINK_LIBRARIES(mars ${ROOT_LIBRARIES}) 210 TARGET_LINK_LIBRARIES(mars ${NOVA_LIBRARY}) 211 TARGET_LINK_LIBRARIES(mars ZLIB::ZLIB) 244 ADD_LIBRARY(mars SHARED dictionary/MARS.cxx) # CMAKE_POSITION_INDEPENDENT_CODE 245 TARGET_LINK_LIBRARIES(mars 246 ZLIB::ZLIB 247 ${NOVA_LIBRARY} 248 ${ROOT_LIBRARIES}) 249 212 250 213 251 FOREACH(DIR ${DIRECTORIES})
Note:
See TracChangeset
for help on using the changeset viewer.