add option for openblas
-disable gfortranlibs - update status info - add submodules
This commit is contained in:
parent
aac063ff62
commit
9e6efce6fe
|
@ -19,7 +19,8 @@ include(CheckFunctionExists)
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------- paths
|
#--------------------------------------- paths
|
||||||
SET(MAINFOLDER ${PROJECT_SOURCE_DIR})
|
#SET(MAINFOLDER ${PROJECT_SOURCE_DIR})
|
||||||
|
SET(MAINFOLDER ${CMAKE_CACHEFILE_DIR})
|
||||||
SET(EXECUTABLE_OUTPUT_PATH "${MAINFOLDER}/dist/bin")
|
SET(EXECUTABLE_OUTPUT_PATH "${MAINFOLDER}/dist/bin")
|
||||||
SET(LIBRARY_OUTPUT_PATH "${MAINFOLDER}/dist/lib")
|
SET(LIBRARY_OUTPUT_PATH "${MAINFOLDER}/dist/lib")
|
||||||
|
|
||||||
|
@ -31,31 +32,13 @@ set( CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH} )
|
||||||
#--------------------------------------- cmake modules
|
#--------------------------------------- cmake modules
|
||||||
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/CMakeModules)
|
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/CMakeModules)
|
||||||
|
|
||||||
#set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|
||||||
#set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/findFFTW/")
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------- user options
|
#--------------------------------------- user options
|
||||||
# TODO: check MPI and CUDA flags!
|
# TODO: check MPI and CUDA flags!
|
||||||
option (ENABLE_MPI "Enable MPI support" OFF)
|
option (ENABLE_MPI "Enable MPI support" OFF)
|
||||||
option (ENABLE_CUDA "Enable CUDA support" OFF)
|
option (ENABLE_CUDA "Enable CUDA support" OFF)
|
||||||
|
option (ENABLE_OPENBLAS "Enable OPENBLAS support" OFF)
|
||||||
|
|
||||||
# TODO: add MPI option
|
|
||||||
# if(ENABLE_MPI)
|
|
||||||
# set (USE_THREADS YES)
|
|
||||||
# find_package (OpenMP)
|
|
||||||
# if (OPENMP_FOUND)
|
|
||||||
# if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
|
||||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qopenmp")
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qopenmp")
|
|
||||||
# else( )
|
|
||||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
|
||||||
# endif( )
|
|
||||||
# else (OPENMP_FOUND)
|
|
||||||
# message(WARNING "Cannot fullfill ENABLE_MPI, compiler does not support it")
|
|
||||||
# endif (OPENMP_FOUND)
|
|
||||||
# endif(ENABLE_MPI)
|
|
||||||
|
|
||||||
#--------------------------------------- rpath setup for libraries
|
#--------------------------------------- rpath setup for libraries
|
||||||
|
|
||||||
|
@ -79,6 +62,7 @@ endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------- SageCal dependencies
|
#--------------------------------------- SageCal dependencies
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
@ -104,15 +88,21 @@ find_package(WcsLib REQUIRED)
|
||||||
message(STATUS "Found LAPACK: ${WCSLIB_INCLUDE_DIR}")
|
message(STATUS "Found LAPACK: ${WCSLIB_INCLUDE_DIR}")
|
||||||
include_directories(${WCSLIB_INCLUDE_DIR})
|
include_directories(${WCSLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
#blas
|
#OpenBlas
|
||||||
find_package(BLAS REQUIRED)
|
find_package(OpenBLAS REQUIRED)
|
||||||
message(STATUS "Found BLAS: ${BLAS_INCLUDE_DIR}")
|
message(STATUS "Found OpenBLAS: ${OpenBLAS_INCLUDE_DIR}")
|
||||||
include_directories(${BLAS_INCLUDE_DIR})
|
include_directories(${OpenBLAS_INCLUDE_DIR})
|
||||||
|
|
||||||
#gfortran
|
##blas
|
||||||
find_package(GFortranLibs REQUIRED)
|
#find_package(BLAS REQUIRED)
|
||||||
message(STATUS "Found GFORTRAN: ${GFORTRAN_INCLUDE_DIR}")
|
#message(STATUS "Found BLAS: ${BLAS_INCLUDE_DIR}")
|
||||||
include_directories(${GFORTRAN_INCLUDE_DIR})
|
#include_directories(${BLAS_INCLUDE_DIR})
|
||||||
|
|
||||||
|
# FIXME: is this really needed?
|
||||||
|
##gfortran
|
||||||
|
#find_package(GFortranLibs REQUIRED)
|
||||||
|
#message(STATUS "Found GFORTRAN: ${GFORTRAN_INCLUDE_DIR}")
|
||||||
|
#include_directories(${GFORTRAN_INCLUDE_DIR})
|
||||||
|
|
||||||
#glib
|
#glib
|
||||||
pkg_check_modules(GLIB_PKG glib-2.0)
|
pkg_check_modules(GLIB_PKG glib-2.0)
|
||||||
|
@ -128,26 +118,44 @@ message (STATUS "CMAKE_SYSTEM .......... = ${CMAKE_SYSTEM}")
|
||||||
message (STATUS "CMAKE_BUILD_TYPE ...... = ${CMAKE_BUILD_TYPE}")
|
message (STATUS "CMAKE_BUILD_TYPE ...... = ${CMAKE_BUILD_TYPE}")
|
||||||
message (STATUS "BUILD_SHARED_LIBS ..... = ${BUILD_SHARED_LIBS}")
|
message (STATUS "BUILD_SHARED_LIBS ..... = ${BUILD_SHARED_LIBS}")
|
||||||
message (STATUS "CMAKE_INSTALL_NAME_DIR = ${CMAKE_INSTALL_NAME_DIR}")
|
message (STATUS "CMAKE_INSTALL_NAME_DIR = ${CMAKE_INSTALL_NAME_DIR}")
|
||||||
message (STATUS "ENABLE_MPI ............ = ${ENABLE_MPI}")
|
|
||||||
message (STATUS "USE_STACKTRACE ........ = ${USE_STACKTRACE}")
|
message (STATUS "USE_STACKTRACE ........ = ${USE_STACKTRACE}")
|
||||||
message (STATUS "CMAKE_CXX_COMPILER .... = ${CMAKE_CXX_COMPILER}")
|
message (STATUS "CMAKE_CXX_COMPILER .... = ${CMAKE_CXX_COMPILER}")
|
||||||
message (STATUS "CMAKE_CXX_FLAGS ....... = ${CMAKE_CXX_FLAGS}")
|
message (STATUS "CMAKE_CXX_FLAGS ....... = ${CMAKE_CXX_FLAGS}")
|
||||||
|
|
||||||
|
message (STATUS "ENABLE_MPI ............ = ${ENABLE_MPI}")
|
||||||
|
message (STATUS "ENABLE_CUDA ........... = ${ENABLE_CUDA}")
|
||||||
|
message (STATUS "ENABLE_OPENBLAS ....... = ${ENABLE_OPENBLAS}")
|
||||||
|
|
||||||
message (STATUS "BLAS-LIBS ............. = ${BLAS_LIBRARIES}")
|
message (STATUS "BLAS-LIBS ............. = ${BLAS_LIBRARIES}")
|
||||||
message (STATUS "GLIB-INC .............. = ${GLIB_PKG_INCLUDE_DIRS}")
|
message (STATUS "GLIB-INC .............. = ${GLIB_PKG_INCLUDE_DIRS}")
|
||||||
message (STATUS "GLIB-LIBS ............. = ${GLIB_PKG_LIBRARIES}")
|
message (STATUS "GLIB-LIBS ............. = ${GLIB_PKG_LIBRARIES}")
|
||||||
message (STATUS "LAPACK-INC ............ = ${LAPACK_INCLUDE_DIR}")
|
message (STATUS "LAPACK-INC ............ = ${LAPACK_INCLUDE_DIR}")
|
||||||
message (STATUS "LAPACK-LIBS ........... = ${LAPACK_LIBRARIES}")
|
message (STATUS "LAPACK-LIBS ........... = ${LAPACK_LIBRARIES}")
|
||||||
message (STATUS "GFORTRAN-INC ......... = ${GFORTRAN_INCLUDE_DIR}")
|
# FIXME: add if gfortranlibs is needed
|
||||||
message (STATUS "GFORTRAN-LIBS ......... = ${LIBGFORTRAN_LIBRARIES}")
|
#message (STATUS "GFORTRAN-INC ......... = ${GFORTRAN_INCLUDE_DIR}")
|
||||||
|
#message (STATUS "GFORTRAN-LIBS ......... = ${LIBGFORTRAN_LIBRARIES}")
|
||||||
message (STATUS "CFITSIO-INC .......... = ${CFITSIO_INCLUDE_DIR}")
|
message (STATUS "CFITSIO-INC .......... = ${CFITSIO_INCLUDE_DIR}")
|
||||||
message (STATUS "CFITSIO-LIBS .......... = ${CFITSIO_LIBRARIES}")
|
message (STATUS "CFITSIO-LIBS .......... = ${CFITSIO_LIBRARIES}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------- build parameters for all targets
|
#--------------------------------------- build parameters for all targets
|
||||||
set (CMAKE_CXX_FLAGS "-Wall -g -pg -Wextra -std=c++11 -W -Wpointer-arith -Woverloaded-virtual -Wwrite-strings -pedantic -Wno-long-long -O3 -ansi -fPIC -fpermissive -fno-omit-frame-pointer -DNDEBUG -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls")
|
set (CMAKE_CXX_FLAGS "-Wall -g -pg -Wextra -std=c++11 -W -Wpointer-arith -Woverloaded-virtual -Wwrite-strings -pedantic -Wno-long-long -O3 -ansi -fPIC -fpermissive -fno-omit-frame-pointer -DNDEBUG -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------- include directories
|
#--------------------------------------- include directories
|
||||||
# FIXME: add sub-cmake files
|
# FIXME: add sub-cmake files
|
||||||
#add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
|
||||||
|
#--------------------------------------- Copy test folder
|
||||||
|
|
||||||
|
# FIXME: this will be the final step for testing
|
||||||
|
#file(COPY ${PROJECT_SOURCE_DIR}/test DESTINATION ${MAINFOLDER}/dist/test)
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ vr 2 dec 2016 23:07:19 CET
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DCASACORE_ROOT_DIR=/opt/soft/casacore/
|
cmake .. -DCASACORE_ROOT_DIR=/opt/soft/casacore/ -DENABLE_CUDA=OFF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue