X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=905ac92778056b80e9875e591b9c479a9d2e67cd;hb=0574a4aadafa8a9357deb13d698ac66931fc06ff;hp=e9df5963eb25ea92366c7163cbb59b6e3f287100;hpb=5f331e648636da48baee4467989f411fb3d8af24;p=unres.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e9df596..905ac92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ cmake_minimum_required(VERSION 2.8) project(UNRESPACK Fortran C) set(UNRES_MAJOR 3) -set(UNRES_MINOR 1) -set(UNRES_PATCH 0) +set(UNRES_MINOR 2) +set(UNRES_PATCH 1) set(UNRES_VERSION ${UNRES_MAJOR}.${UNRES_MINOR}.${UNRES_PATCH}) #====================================== @@ -63,6 +63,13 @@ MACRO (CINFO_FORMAT FN VN VD) file(APPEND ${FN} " write(iout,*)'${STR}'\n") endif(SUMA GREATER 50) ENDMACRO (CINFO_FORMAT) + +# Some MPI wrappers pass double include paths +# This macro fixes broken by semicolon occurence in path +MACRO (FIX_DBL_INCLUDE RESULT) + string(REPLACE ";" " -I" ${RESULT} "${${RESULT}}") +ENDMACRO (FIX_DBL_INCLUDE) + #====================================== # CTest stuff #======================================A @@ -70,8 +77,6 @@ ENDMACRO (CINFO_FORMAT) include(CTest) enable_testing() -# Set makefile verbose on -set( CMAKE_VERBOSE_MAKEFILE 1 ) #====================================== # Fortran compilers stuff @@ -88,10 +93,23 @@ SET(CMAKE_Fortran_COMPILE_OBJECT " ${CMAKE_START_TEMP_F # make sure that the default is a RELEASE if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None Debug Release." FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "None" "Debug" "Release" ) + set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "None" "Debug" "Release" "RelWithDebInfo") endif (NOT CMAKE_BUILD_TYPE) - + + +if (CMAKE_BUILD_TYPE STREQUAL "Release") + # Set makefile verbosity off for Release builds + set( CMAKE_VERBOSE_MAKEFILE 0 ) +else() + # Set makefile verbosity on for other builds + set( CMAKE_VERBOSE_MAKEFILE 1 ) +endif (CMAKE_BUILD_TYPE STREQUAL "Release") + +# Default Install Path + +set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/bin" CACHE PATH "Binary install directory " FORCE) + #======================================= # Set the varous build variables #======================================= @@ -125,6 +143,7 @@ find_package(MPI QUIET) if (MPI_Fortran_FOUND) message("MPI found") + FIX_DBL_INCLUDE(MPI_Fortran_INCLUDE_PATH) else() message("MPI not found - disabling MPI compile flags ") set ( UNRES_WITH_MPI "OFF") @@ -149,13 +168,6 @@ message("Detected ${architektura}-bit architecture") # used by unres/src_MIN find_package (Threads) - - -#======================================= -# Create diractories for build targets -#======================================= -#execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/unres/MD ) - #======================================= # Add source files #=======================================