some first cmake tuning for macOS.

This commit is contained in:
2018-05-05 16:47:11 +02:00
parent 42086350e7
commit 9bf47a2690
3 changed files with 32 additions and 6 deletions

View File

@ -9,6 +9,7 @@ option(ASlibs "build optional ASlibs" OFF)
option(BMWlibs "build optional BMWlibs" OFF)
option(BNMRlibs "build optional beta-NMR libs" OFF)
option(qt_based_tools "try to install Qt based tools (musredit, musrWiz, musrStep, mupp)" ON)
option(try_OpenMP "try to use OpenMP if available" ON)
#--- check for all the needed packages ----------------------------------------
@ -43,10 +44,12 @@ find_package(FFTW3 REQUIRED)
find_package(LibXml2 REQUIRED)
#--- check for OpenMP ---------------------------------------------------------
find_package(OpenMP)
if (OpenMP_FOUND)
add_definitions(-DHAVE_GOMP)
endif (OpenMP_FOUND)
if (try_OpenMP)
find_package(OpenMP)
if (OpenMP_FOUND)
add_definitions(-DHAVE_GOMP)
endif (OpenMP_FOUND)
endif (try_OpenMP)
#--- check for Qt -------------------------------------------------------------
if (qt_based_tools)
@ -107,6 +110,9 @@ message(" GSL found in ${GSL_INCLUDE_DIRS}")
message(" BOOST found in ${Boost_INCLUDE_DIRS}")
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}")
message(" ROOT found in ${ROOT_INCLUDE_DIRS}")
if (OpenMP_FOUND)
message(" OpenMP found (version ${OpenMP_VERSION})")
endif (OpenMP_FOUND)
if (nexus)
message("")
@ -121,7 +127,19 @@ if (BMWlibs)
endif (BMWlibs)
message("")
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
if (qt_based_tools)
if (Qt5Core_FOUND)
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
else (Qt5Core_FOUND)
if (Qt4_FOUND)
message(" Qt found in ${Qt4_INCLUDE_DIRS} (Version: ${Qt4_VERSION})")
else (Qt4_FOUND)
if (QT_FOUND)
message(" Qt found in ${QT_INCLUDE_DIRS} (Version: ${QT_VERSION})")
endif (QT_FOUND)
endif (Qt4_FOUND)
endif (Qt5Core_FOUND)
endif (qt_based_tools)
message("")
message(" Features:")
message(" ---------")