some first cmake tuning for macOS.
This commit is contained in:
parent
42086350e7
commit
9bf47a2690
@ -9,6 +9,7 @@ option(ASlibs "build optional ASlibs" OFF)
|
|||||||
option(BMWlibs "build optional BMWlibs" OFF)
|
option(BMWlibs "build optional BMWlibs" OFF)
|
||||||
option(BNMRlibs "build optional beta-NMR libs" 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(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 ----------------------------------------
|
#--- check for all the needed packages ----------------------------------------
|
||||||
|
|
||||||
@ -43,10 +44,12 @@ find_package(FFTW3 REQUIRED)
|
|||||||
find_package(LibXml2 REQUIRED)
|
find_package(LibXml2 REQUIRED)
|
||||||
|
|
||||||
#--- check for OpenMP ---------------------------------------------------------
|
#--- check for OpenMP ---------------------------------------------------------
|
||||||
find_package(OpenMP)
|
if (try_OpenMP)
|
||||||
if (OpenMP_FOUND)
|
find_package(OpenMP)
|
||||||
add_definitions(-DHAVE_GOMP)
|
if (OpenMP_FOUND)
|
||||||
endif (OpenMP_FOUND)
|
add_definitions(-DHAVE_GOMP)
|
||||||
|
endif (OpenMP_FOUND)
|
||||||
|
endif (try_OpenMP)
|
||||||
|
|
||||||
#--- check for Qt -------------------------------------------------------------
|
#--- check for Qt -------------------------------------------------------------
|
||||||
if (qt_based_tools)
|
if (qt_based_tools)
|
||||||
@ -107,6 +110,9 @@ message(" GSL found in ${GSL_INCLUDE_DIRS}")
|
|||||||
message(" BOOST found in ${Boost_INCLUDE_DIRS}")
|
message(" BOOST found in ${Boost_INCLUDE_DIRS}")
|
||||||
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}")
|
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}")
|
||||||
message(" ROOT found in ${ROOT_INCLUDE_DIRS}")
|
message(" ROOT found in ${ROOT_INCLUDE_DIRS}")
|
||||||
|
if (OpenMP_FOUND)
|
||||||
|
message(" OpenMP found (version ${OpenMP_VERSION})")
|
||||||
|
endif (OpenMP_FOUND)
|
||||||
|
|
||||||
if (nexus)
|
if (nexus)
|
||||||
message("")
|
message("")
|
||||||
@ -121,7 +127,19 @@ if (BMWlibs)
|
|||||||
endif (BMWlibs)
|
endif (BMWlibs)
|
||||||
|
|
||||||
message("")
|
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("")
|
||||||
message(" Features:")
|
message(" Features:")
|
||||||
message(" ---------")
|
message(" ---------")
|
||||||
|
@ -106,7 +106,6 @@ if (nexus)
|
|||||||
set(DependOnLibs ${DependOnLibs} ${LIBNEXUS_LIBRARY})
|
set(DependOnLibs ${DependOnLibs} ${LIBNEXUS_LIBRARY})
|
||||||
set(DependOnLibs ${DependOnLibs} PNeXus)
|
set(DependOnLibs ${DependOnLibs} PNeXus)
|
||||||
endif (nexus)
|
endif (nexus)
|
||||||
message("debug> OpenMP_FOUND: ${OpenMP_FOUND}, libs: ${OpenMP_CXX_LIBRARIES}")
|
|
||||||
if (OpenMP_FOUND)
|
if (OpenMP_FOUND)
|
||||||
set(DependOnLibs ${DependOnLibs} ${OpenMP_CXX_LIBRARIES})
|
set(DependOnLibs ${DependOnLibs} ${OpenMP_CXX_LIBRARIES})
|
||||||
endif (OpenMP_FOUND)
|
endif (OpenMP_FOUND)
|
||||||
|
@ -9,6 +9,15 @@ set(PSIBIN_VERSION "0.1.0")
|
|||||||
set(PSIBIN_LIBRARY_NAME "Class_MuSR_PSI")
|
set(PSIBIN_LIBRARY_NAME "Class_MuSR_PSI")
|
||||||
configure_file("Class_MuSR_PSI.pc.in" "Class_MuSR_PSI.pc" @ONLY)
|
configure_file("Class_MuSR_PSI.pc.in" "Class_MuSR_PSI.pc" @ONLY)
|
||||||
|
|
||||||
|
#--- OS dependent pre-compiler settings for PSI-BIN ---------------------------
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
add_definitions(-D__linux__)
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
|
add_definitions(-D_Darwin_)
|
||||||
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
|
add_definitions(-D_WIN32)
|
||||||
|
endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
|
||||||
#--- lib creation -------------------------------------------------------------
|
#--- lib creation -------------------------------------------------------------
|
||||||
add_library(Class_MuSR_PSI SHARED MuSR_td_PSI_bin.cpp)
|
add_library(Class_MuSR_PSI SHARED MuSR_td_PSI_bin.cpp)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user