Changeset 2296
- Timestamp:
- 09/14/11 14:39:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r2289 r2296 31 31 endif() 32 32 33 33 34 # project name is ASAP 34 35 project( ASAP ) 35 36 36 # flags 37 38 # 39 # build type and their flags 40 # 41 # CMAKE_BUILD_TYPE (Release, Debug, RelWithDebInfo, MinSizeRel, Profile) 42 # default is RelWithDebInfo 43 # 44 if ( NOT CMAKE_BUILD_TYPE ) 45 set( CMAKE_BUILD_TYPE RelWithDebInfo ) 46 endif() 47 message( STATUS "CMAKE_BUILD_TYPE = " ${CMAKE_BUILD_TYPE} ) 48 49 # flags for Debug build 50 if ( CMAKE_BUILD_TYPE STREQUAL Debug ) 51 add_definitions( -DAIPS_DEBUG ) 52 endif() 53 set( CMAKE_CXX_FLAGS_DEBUG "-ggdb3 -O0 -fno-omit-frame-pointer" ) 54 55 # flags for Profile build 56 set( CMAKE_CXX_FLAGS_PROFILE "-g -O2 -pg -fprofile-arcs -fno-omit-frame-pointer" ) 57 58 # flags for Release build 59 set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wl,-s" ) 60 61 # flags for MinSizeRel build 62 set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Wl,-s" ) 63 64 # default flags 37 65 set( DEFAULT_CXX_FLAGS 38 "-pipe -Wall -Wextra -Wno-non-template-friend -Wcast-align -Wno-comment -O3 -fno-omit-frame-pointer" ) 66 "-pipe -Wall -Wextra -Wno-non-template-friend -Wcast-align -Wno-comment" ) 67 39 68 find_package( OpenMP ) 40 69 if( OPENMP_FOUND ) 41 70 set( DEFAULT_CXX_FLAGS "${DEFAULT_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" ) 42 71 endif() 43 44 set( CASACORE_DEFINITIONS ${CASACORE_DEFINITIONS}45 -DCASA_USECASAPATH46 -DCASACORE_NEEDS_RETHROW47 -DAIPS_STDLIB48 -DAIPS_AUTO_STL49 -D_GNU_SOURCE )50 51 if( CMAKE_SYSTEM_NAME STREQUAL Linux )52 set( CASACORE_DEFINITIONS ${CASACORE_DEFINITIONS}53 -D_FILE_OFFSET_BITS=6454 -D_LARGEFILE_SOURCE55 )56 endif()57 58 add_definitions( ${CASACORE_DEFINITIONS} )59 60 # set flags for cpp compiler61 set( CMAKE_CXX_FLAGS ${DEFAULT_CXX_FLAGS} )62 72 63 73 # environment dependent settings … … 98 108 endif() 99 109 endif() 110 111 # set flags for cpp compiler 112 set( CMAKE_CXX_FLAGS ${DEFAULT_CXX_FLAGS} ) 113 114 115 # 116 # casacore definitions 117 # 118 set( CASACORE_DEFINITIONS ${CASACORE_DEFINITIONS} 119 -DCASA_USECASAPATH 120 -DCASACORE_NEEDS_RETHROW 121 -DAIPS_STDLIB 122 -DAIPS_AUTO_STL 123 -D_GNU_SOURCE ) 124 125 if( CMAKE_SYSTEM_NAME STREQUAL Linux ) 126 set( CASACORE_DEFINITIONS ${CASACORE_DEFINITIONS} 127 -D_FILE_OFFSET_BITS=64 128 -D_LARGEFILE_SOURCE 129 ) 130 endif() 131 132 add_definitions( ${CASACORE_DEFINITIONS} ) 100 133 101 134
Note:
See TracChangeset
for help on using the changeset viewer.