Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -5,11 +5,14 @@
|
||||
# Autocmake update time.
|
||||
# Note that the build-up commands are not Windows-compatible!
|
||||
#
|
||||
# Your autocmake.cfg should look like this::
|
||||
# Your autocmake.yml should look like this::
|
||||
#
|
||||
# [boost]
|
||||
# override: {'major': 1, 'minor': 59, 'patch': 0, 'components': 'chrono;timer;system'}
|
||||
# source: https://github.com/scisoft/autocmake/raw/master/modules/boost/boost.cmake
|
||||
# - boost:
|
||||
# - major: 1
|
||||
# - minor: 59
|
||||
# - patch: 0
|
||||
# - components: "chrono;timer;system"
|
||||
# - source: "https://github.com/coderefinery/autocmake/raw/master/modules/boost/boost.cmake"
|
||||
#
|
||||
# Cross-dependencies between required components are not checked for.
|
||||
# For example, Boost.Timer depends on Boost.Chrono and Boost.System thus you
|
||||
@ -43,39 +46,41 @@
|
||||
# MPI_FOUND
|
||||
# BUILD_CUSTOM_BOOST
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# major=1
|
||||
# minor=48
|
||||
# patch=0
|
||||
# components=''
|
||||
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_unpack.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_userconfig.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_configure.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_build.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_install.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_headers.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/boost/boost_cleanup.cmake
|
||||
# http://sourceforge.net/projects/boost/files/boost/%(major)s.%(minor)s.%(patch)s/boost_%(major)s_%(minor)s_%(patch)s.zip
|
||||
# docopt: --boost-headers=<BOOST_INCLUDEDIR> Include directories for Boost [default: ''].
|
||||
# --boost-libraries=<BOOST_LIBRARYDIR> Library directories for Boost [default: ''].
|
||||
# --build-boost=<FORCE_CUSTOM_BOOST> Deactivate Boost detection and build on-the-fly <ON/OFF> [default: OFF].
|
||||
# define: '-DBOOST_INCLUDEDIR="{0}"'.format(arguments['--boost-headers'])
|
||||
# '-DBOOST_LIBRARYDIR="{0}"'.format(arguments['--boost-libraries'])
|
||||
# '-DFORCE_CUSTOM_BOOST="{0}"'.format(arguments['--build-boost'])
|
||||
# '-DBOOST_MINIMUM_REQUIRED="%(major)s.%(minor)s.%(patch)s"'
|
||||
# '-DBOOST_COMPONENTS_REQUIRED="%(components)s"'
|
||||
# url_root: https://github.com/coderefinery/autocmake/raw/master/
|
||||
# major: 1
|
||||
# minor: 48
|
||||
# patch: 0
|
||||
# components: ""
|
||||
# fetch:
|
||||
# - "%(url_root)modules/boost/boost_unpack.cmake"
|
||||
# - "%(url_root)modules/boost/boost_userconfig.cmake"
|
||||
# - "%(url_root)modules/boost/boost_configure.cmake"
|
||||
# - "%(url_root)modules/boost/boost_build.cmake"
|
||||
# - "%(url_root)modules/boost/boost_install.cmake"
|
||||
# - "%(url_root)modules/boost/boost_headers.cmake"
|
||||
# - "%(url_root)modules/boost/boost_cleanup.cmake"
|
||||
# - "http://sourceforge.net/projects/boost/files/boost/%(major).%(minor).%(patch)/boost_%(major)_%(minor)_%(patch).zip"
|
||||
# docopt:
|
||||
# - "--boost-headers=<BOOST_INCLUDEDIR> Include directories for Boost [default: '']."
|
||||
# - "--boost-libraries=<BOOST_LIBRARYDIR> Library directories for Boost [default: '']."
|
||||
# - "--build-boost=<FORCE_CUSTOM_BOOST> Deactivate Boost detection and build on-the-fly <ON/OFF> [default: OFF]."
|
||||
# define:
|
||||
# - "'-DBOOST_INCLUDEDIR=\"{0}\"'.format(arguments['--boost-headers'])"
|
||||
# - "'-DBOOST_LIBRARYDIR=\"{0}\"'.format(arguments['--boost-libraries'])"
|
||||
# - "'-DFORCE_CUSTOM_BOOST={0}'.format(arguments['--build-boost'])"
|
||||
# - "'-DBOOST_MINIMUM_REQUIRED=\"%(major).%(minor).%(patch)\"'"
|
||||
# - "'-DBOOST_COMPONENTS_REQUIRED=\"%(components)\"'"
|
||||
|
||||
# FIXME Maintainer should be able to choose between fail (end-user has to satisfy dependency
|
||||
# on its own) and soft-fail (self-build of Boost)
|
||||
# Underscore-separated version number
|
||||
string(REGEX REPLACE "\\." "_" BOOSTVER ${BOOST_MINIMUM_REQUIRED})
|
||||
|
||||
# Where the Boost .zip archive is located
|
||||
# CMAKE_CURRENT_LIST_DIR is undefined in CMake 2.8.2
|
||||
# see https://public.kitware.com/Bug/print_bug_page.php?bug_id=11675
|
||||
# workaround: create CMAKE_CURRENT_LIST_DIR
|
||||
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
set(BOOST_ARCHIVE_LOCATION ${CMAKE_CURRENT_LIST_DIR})
|
||||
set(BOOST_ARCHIVE_LOCATION ${PROJECT_SOURCE_DIR}/cmake/downloaded)
|
||||
|
||||
set(BOOST_ARCHIVE boost_${BOOSTVER}.zip)
|
||||
|
||||
# FIXME These are possibly not always good settings
|
||||
|
@ -17,12 +17,13 @@
|
||||
#
|
||||
# CFLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --cc=<CC> C compiler [default: gcc].
|
||||
# --extra-cc-flags=<EXTRA_CFLAGS> Extra C compiler flags [default: ''].
|
||||
# export: 'CC={0}'.format(arguments['--cc'])
|
||||
# define: '-DEXTRA_CFLAGS="{0}"'.format(arguments['--extra-cc-flags'])
|
||||
# docopt:
|
||||
# - "--cc=<CC> C compiler [default: gcc]."
|
||||
# - "--extra-cc-flags=<EXTRA_CFLAGS> Extra C compiler flags [default: '']."
|
||||
# export: "'CC={0}'.format(arguments['--cc'])"
|
||||
# define: "'-DEXTRA_CFLAGS=\"{0}\"'.format(arguments['--extra-cc-flags'])"
|
||||
|
||||
enable_language(C)
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
#
|
||||
# CCACHE_FOUND
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --ccache=<USE_CCACHE> Toggle use of ccache <ON/OFF> [default: ON].
|
||||
# define: '-DUSE_CCACHE="{0}"'.format(arguments['--ccache'])
|
||||
# docopt: "--ccache=<USE_CCACHE> Toggle use of ccache <ON/OFF> [default: ON]."
|
||||
# define: "'-DUSE_CCACHE={0}'.format(arguments['--ccache'])"
|
||||
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
|
@ -8,10 +8,10 @@
|
||||
# CMAKE_C_FLAGS
|
||||
# CMAKE_CXX_FLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --coverage Enable code coverage [default: False].
|
||||
# define: '-DENABLE_CODE_COVERAGE=%s' % arguments['--coverage']
|
||||
# docopt: "--coverage Enable code coverage [default: False]."
|
||||
# define: "'-DENABLE_CODE_COVERAGE={0}'.format(arguments['--coverage'])"
|
||||
|
||||
option(ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
|
||||
|
||||
|
@ -17,12 +17,13 @@
|
||||
#
|
||||
# CXXFLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --cxx=<CXX> C++ compiler [default: g++].
|
||||
# --extra-cxx-flags=<EXTRA_CXXFLAGS> Extra C++ compiler flags [default: ''].
|
||||
# export: 'CXX={0}'.format(arguments['--cxx'])
|
||||
# define: '-DEXTRA_CXXFLAGS="{0}"'.format(arguments['--extra-cxx-flags'])
|
||||
# docopt:
|
||||
# - "--cxx=<CXX> C++ compiler [default: g++]."
|
||||
# - "--extra-cxx-flags=<EXTRA_CXXFLAGS> Extra C++ compiler flags [default: '']."
|
||||
# export: "'CXX={0}'.format(arguments['--cxx'])"
|
||||
# define: "'-DEXTRA_CXXFLAGS=\"{0}\"'.format(arguments['--extra-cxx-flags'])"
|
||||
|
||||
enable_language(CXX)
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
||||
#
|
||||
# PREPROCESSOR_DEFINITIONS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --add-definitions=<STRING> Add preprocesor definitions [default: ''].
|
||||
# define: '-DPREPROCESSOR_DEFINITIONS="%s"' % arguments['--add-definitions']
|
||||
# docopt: "--add-definitions=<STRING> Add preprocesor definitions [default: '']."
|
||||
# define: "'-DPREPROCESSOR_DEFINITIONS=\"{0}\"'.format(arguments['--add-definitions'])"
|
||||
|
||||
if(NOT "${PREPROCESSOR_DEFINITIONS}" STREQUAL "")
|
||||
add_definitions(${PREPROCESSOR_DEFINITIONS})
|
||||
|
@ -21,12 +21,13 @@
|
||||
#
|
||||
# FCFLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --fc=<FC> Fortran compiler [default: gfortran].
|
||||
# --extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: ''].
|
||||
# export: 'FC={0}'.format(arguments['--fc'])
|
||||
# define: '-DEXTRA_FCFLAGS="{0}"'.format(arguments['--extra-fc-flags'])
|
||||
# docopt:
|
||||
# - "--fc=<FC> Fortran compiler [default: gfortran]."
|
||||
# - "--extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: '']."
|
||||
# export: "'FC={0}'.format(arguments['--fc'])"
|
||||
# define: "'-DEXTRA_FCFLAGS=\"{0}\"'.format(arguments['--extra-fc-flags'])"
|
||||
|
||||
enable_language(Fortran)
|
||||
|
||||
|
@ -26,14 +26,16 @@
|
||||
#
|
||||
# FCFLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --fc=<FC> Fortran compiler [default: gfortran].
|
||||
# --extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: ''].
|
||||
# --fc-support=<FC_SUPPORT> Toggle Fortran language support (ON/OFF) [default: ON].
|
||||
# export: 'FC={0}'.format(arguments['--fc'])
|
||||
# define: '-DEXTRA_FCFLAGS="{0}"'.format(arguments['--extra-fc-flags'])
|
||||
# '-DENABLE_FC_SUPPORT="{0}"'.format(arguments['--fc-support'])
|
||||
# docopt:
|
||||
# - "--fc=<FC> Fortran compiler [default: gfortran]."
|
||||
# - "--extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: '']."
|
||||
# - "--fc-support=<FC_SUPPORT> Toggle Fortran language support (ON/OFF) [default: ON]."
|
||||
# export: "'FC={0}'.format(arguments['--fc'])"
|
||||
# define:
|
||||
# - "'-DEXTRA_FCFLAGS=\"{0}\"'.format(arguments['--extra-fc-flags'])"
|
||||
# - "'-DENABLE_FC_SUPPORT={0}'.format(arguments['--fc-support'])"
|
||||
|
||||
option(ENABLE_FC_SUPPORT "Enable Fortran language support" ON)
|
||||
|
||||
|
@ -65,6 +65,6 @@ function(generate_git_info_header _header_location _header_name)
|
||||
|
||||
add_custom_target(
|
||||
git_info
|
||||
ALL DEPENDS ${_header_location}/${_header_name}
|
||||
ALL DEPENDS ${PROJECT_BINARY_DIR}/git_info.h
|
||||
)
|
||||
endfunction()
|
||||
|
@ -6,11 +6,11 @@
|
||||
#
|
||||
# GOOGLETEST_ROOT
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# define: '-DGOOGLETEST_ROOT=external/googletest'
|
||||
# define: "'-DGOOGLETEST_ROOT=external/googletest/googletest'"
|
||||
|
||||
set(GOOGLETEST_ROOT external/googletest CACHE STRING "Google Test source root")
|
||||
set(GOOGLETEST_ROOT external/googletest/googletest CACHE STRING "Google Test source root")
|
||||
|
||||
message(STATUS "GOOGLETEST_ROOT set to ${GOOGLETEST_ROOT}")
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
#
|
||||
# CMAKE_Fortran_FLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --int64 Enable 64bit integers [default: False].
|
||||
# define: '-DENABLE_64BIT_INTEGERS=%s' % arguments['--int64']
|
||||
# docopt: "--int64 Enable 64bit integers [default: False]."
|
||||
# define: "'-DENABLE_64BIT_INTEGERS={0}'.format(arguments['--int64'])"
|
||||
|
||||
option(ENABLE_64BIT_INTEGERS "Enable 64-bit integers" OFF)
|
||||
|
||||
|
@ -8,12 +8,14 @@
|
||||
# ACCELERATE_LIBRARIES - describe me, uncached
|
||||
# ACCELERATE_INCLUDE_DIR - describe me, uncached
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --accelerate Find and link to ACCELERATE [default: False].
|
||||
# define: '-DENABLE_ACCELERATE=%s' % arguments['--accelerate']
|
||||
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/find/find_libraries.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/find/find_include_files.cmake
|
||||
# url_root: https://github.com/coderefinery/autocmake/raw/master/
|
||||
# docopt: "--accelerate Find and link to ACCELERATE [default: False]."
|
||||
# define: "'-DENABLE_ACCELERATE={0}'.format(arguments['--accelerate'])"
|
||||
# fetch:
|
||||
# - "%(url_root)modules/find/find_libraries.cmake"
|
||||
# - "%(url_root)modules/find/find_include_files.cmake"
|
||||
|
||||
option(ENABLE_ACCELERATE "Find and link to ACCELERATE" OFF)
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
# ACML_LIBRARIES
|
||||
# ACML_INCLUDE_DIR
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --acml Find and link to ACML [default: False].
|
||||
# define: '-DENABLE_ACML=%s' % arguments['--acml']
|
||||
# docopt: "--acml Find and link to ACML [default: False]."
|
||||
# define: "'-DENABLE_ACML={0}'.format(arguments['--acml'])"
|
||||
|
||||
option(ENABLE_ACML "Find and link to ACML" OFF)
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
# ATLAS_LIBRARIES
|
||||
# ATLAS_INCLUDE_DIR
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --atlas Find and link to ATLAS [default: False].
|
||||
# define: '-DENABLE_ATLAS=%s' % arguments['--atlas']
|
||||
# docopt: "--atlas Find and link to ATLAS [default: False]."
|
||||
# define: "'-DENABLE_ATLAS={0}'.format(arguments['--atlas'])"
|
||||
|
||||
option(ENABLE_ATLAS "Find and link to ATLAS" OFF)
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
# BLAS_LIBRARIES
|
||||
# BLAS_INCLUDE_DIR
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --blas Find and link to BLAS [default: False].
|
||||
# define: '-DENABLE_BLAS=%s' % arguments['--blas']
|
||||
# docopt: "--blas Find and link to BLAS [default: False]."
|
||||
# define: "'-DENABLE_BLAS={0}'.format(arguments['--blas'])"
|
||||
|
||||
option(ENABLE_BLAS "Find and link to BLAS" OFF)
|
||||
|
||||
|
@ -8,12 +8,14 @@
|
||||
# CBLAS_LIBRARIES - describe me, uncached
|
||||
# CBLAS_INCLUDE_DIR - describe me, uncached
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --cblas Find and link to CBLAS [default: False].
|
||||
# define: '-DENABLE_CBLAS=%s' % arguments['--cblas']
|
||||
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/find/find_libraries.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/find/find_include_files.cmake
|
||||
# url_root: https://github.com/coderefinery/autocmake/raw/master/
|
||||
# docopt: "--cblas Find and link to CBLAS [default: False]."
|
||||
# define: "'-DENABLE_CBLAS={0}'.format(arguments['--cblas'])"
|
||||
# fetch:
|
||||
# - "%(url_root)modules/find/find_libraries.cmake"
|
||||
# - "%(url_root)modules/find/find_include_files.cmake"
|
||||
|
||||
option(ENABLE_CBLAS "Find and link to CBLAS" OFF)
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
# GOTO_LIBRARIES
|
||||
# GOTO_INCLUDE_DIR
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --goto Find and link to GOTO [default: False].
|
||||
# define: '-DENABLE_GOTO=%s' % arguments['--goto']
|
||||
# docopt: "--goto Find and link to GOTO [default: False]."
|
||||
# define: "'-DENABLE_GOTO={0}'.format(arguments['--goto'])"
|
||||
|
||||
option(ENABLE_GOTO "Find and link to GOTO" OFF)
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
# LAPACK_LIBRARIES
|
||||
# LAPACK_INCLUDE_DIR
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --lapack Find and link to LAPACK [default: False].
|
||||
# define: '-DENABLE_LAPACK=%s' % arguments['--lapack']
|
||||
# docopt: "--lapack Find and link to LAPACK [default: False]."
|
||||
# define: "'-DENABLE_LAPACK={0}'.format(arguments['--lapack'])"
|
||||
|
||||
option(ENABLE_LAPACK "Find and link to LAPACK" OFF)
|
||||
|
||||
|
@ -8,12 +8,14 @@
|
||||
# LAPACKE_LIBRARIES - describe me, uncached
|
||||
# LAPACKE_INCLUDE_DIR - describe me, uncached
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --lapacke Find and link to LAPACKE [default: False].
|
||||
# define: '-DENABLE_LAPACKE=%s' % arguments['--lapacke']
|
||||
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/find/find_libraries.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/find/find_include_files.cmake
|
||||
# url_root: https://github.com/coderefinery/autocmake/raw/master/
|
||||
# docopt: "--lapacke Find and link to LAPACKE [default: False]."
|
||||
# define: "'-DENABLE_LAPACKE={0}'.format(arguments['--lapacke'])"
|
||||
# fetch:
|
||||
# - "%(url_root)modules/find/find_libraries.cmake"
|
||||
# - "%(url_root)modules/find/find_include_files.cmake"
|
||||
|
||||
option(ENABLE_LAPACKE "Find and link to LAPACKE" OFF)
|
||||
|
||||
|
@ -37,18 +37,20 @@
|
||||
# MKL_ROOT
|
||||
# MKLROOT
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --blas=<BLAS> Detect and link BLAS library (auto or off) [default: auto].
|
||||
# --lapack=<LAPACK> Detect and link LAPACK library (auto or off) [default: auto].
|
||||
# --mkl=<MKL> Pass MKL flag to the Intel compiler and linker and skip BLAS/LAPACK detection (sequential, parallel, cluster, or off) [default: off].
|
||||
# define: '-DENABLE_BLAS=%s' % arguments['--blas']
|
||||
# '-DENABLE_LAPACK=%s' % arguments['--lapack']
|
||||
# '-DMKL_FLAG=%s' % arguments['--mkl']
|
||||
# '-DMATH_LIB_SEARCH_ORDER="MKL;ESSL;OPENBLAS;ATLAS;ACML;SYSTEM_NATIVE"'
|
||||
# '-DBLAS_LANG=Fortran'
|
||||
# '-DLAPACK_LANG=Fortran'
|
||||
# warning: 'This module is deprecated and will be removed in future versions'
|
||||
# docopt:
|
||||
# - "--blas=<BLAS> Detect and link BLAS library (auto or off) [default: auto]."
|
||||
# - "--lapack=<LAPACK> Detect and link LAPACK library (auto or off) [default: auto]."
|
||||
# - "--mkl=<MKL> Pass MKL flag to the Intel compiler and linker and skip BLAS/LAPACK detection (sequential, parallel, cluster, or off) [default: off]."
|
||||
# define:
|
||||
# - "'-DENABLE_BLAS={0}'.format(arguments['--blas'])"
|
||||
# - "'-DENABLE_LAPACK={0}'.format(arguments['--lapack'])"
|
||||
# - "'-DMKL_FLAG={0}'.format(arguments['--mkl'])"
|
||||
# - "'-DMATH_LIB_SEARCH_ORDER=\"MKL;ESSL;OPENBLAS;ATLAS;ACML;SYSTEM_NATIVE\"'"
|
||||
# - "'-DBLAS_LANG=Fortran'"
|
||||
# - "'-DLAPACK_LANG=Fortran'"
|
||||
# warning: "the math_libs.cmake module is deprecated and will be removed in future versions"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# ENABLE_STATIC_LINKING
|
||||
@ -506,7 +508,7 @@ if (ENABLE_STATIC_LINKING)
|
||||
BLAS_TYPE MATCHES SYSTEM_NATIVE OR
|
||||
BLAS_TYPE MATCHES OPENBLAS)
|
||||
#cc_blas_static with ATLAS on travis-ci needs -lm
|
||||
set(MATH_LIBS ${MATH_LIBS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm)
|
||||
set(MATH_LIBS ${MATH_LIBS} -Wl,--whole-archive -lpthread -ldl -Wl,--no-whole-archive -lm)
|
||||
endif()
|
||||
if (LAPACK_TYPE MATCHES MKL OR
|
||||
BLAS_TYPE MATCHES MKL)
|
||||
|
@ -13,10 +13,10 @@
|
||||
# CMAKE_C_FLAGS
|
||||
# CMAKE_CXX_FLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --mpi Enable MPI parallelization [default: False].
|
||||
# define: '-DENABLE_MPI=%s' % arguments['--mpi']
|
||||
# docopt: "--mpi Enable MPI parallelization [default: False]."
|
||||
# define: "'-DENABLE_MPI={0}'.format(arguments['--mpi'])"
|
||||
|
||||
option(ENABLE_MPI "Enable MPI parallelization" OFF)
|
||||
|
||||
|
@ -13,33 +13,14 @@
|
||||
# CMAKE_C_FLAGS
|
||||
# CMAKE_CXX_FLAGS
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --omp Enable OpenMP parallelization [default: False].
|
||||
# define: '-DENABLE_OPENMP=%s' % arguments['--omp']
|
||||
# docopt: "--omp Enable OpenMP parallelization [default: False]."
|
||||
# define: "'-DENABLE_OPENMP={0}'.format(arguments['--omp'])"
|
||||
|
||||
option(ENABLE_OPENMP "Enable OpenMP parallelization" OFF)
|
||||
|
||||
if(ENABLE_OPENMP)
|
||||
if(DEFINED CMAKE_Fortran_COMPILER_ID)
|
||||
# we do this in a pedestrian way because the Fortran support is relatively recent
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES XL)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Cray)
|
||||
# do nothing in this case
|
||||
endif()
|
||||
set(OPENMP_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT OPENMP_FOUND)
|
||||
find_package(OpenMP)
|
||||
@ -53,5 +34,35 @@ if(ENABLE_OPENMP)
|
||||
if(DEFINED CMAKE_CXX_COMPILER_ID)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
if(DEFINED CMAKE_Fortran_COMPILER_ID)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED CMAKE_Fortran_COMPILER_ID AND NOT DEFINED OpenMP_Fortran_FLAGS)
|
||||
# we do this in a pedestrian way because the Fortran support is relatively recent
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
|
||||
if(WIN32)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Qopenmp")
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" AND
|
||||
"${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
|
||||
else()
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES XL)
|
||||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp")
|
||||
endif()
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Cray)
|
||||
# do nothing in this case
|
||||
endif()
|
||||
set(OPENMP_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -15,10 +15,10 @@
|
||||
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
|
||||
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
# autocmake.yml configuration::
|
||||
#
|
||||
# docopt: --python=<PYTHON_INTERPRETER> The Python interpreter (development version) to use. [default: ''].
|
||||
# define: '-DPYTHON_INTERPRETER="%s"' % arguments['--python']
|
||||
# docopt: "--python=<PYTHON_INTERPRETER> The Python interpreter (development version) to use. [default: '']."
|
||||
# define: "'-DPYTHON_INTERPRETER=\"{0}\"'.format(arguments['--python'])"
|
||||
|
||||
if("${PYTHON_INTERPRETER}" STREQUAL "")
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
43
modules/save_flags.cmake
Normal file
43
modules/save_flags.cmake
Normal file
@ -0,0 +1,43 @@
|
||||
#.rst:
|
||||
#
|
||||
# Take care of updating the cache for fresh configurations.
|
||||
#
|
||||
# Variables modified (provided the corresponding language is enabled)::
|
||||
#
|
||||
# DEFAULT_Fortran_FLAGS_SET
|
||||
# DEFAULT_C_FLAGS_SET
|
||||
# DEFAULT_CXX_FLAGS_SET
|
||||
|
||||
macro(save_compiler_flags lang)
|
||||
if (NOT DEFINED DEFAULT_${lang}_FLAGS_SET)
|
||||
mark_as_advanced(DEFAULT_${lang}_FLAGS_SET)
|
||||
|
||||
set (DEFAULT_${lang}_FLAGS_SET ON
|
||||
CACHE INTERNAL
|
||||
"Flag that the default ${lang} compiler flags have been set.")
|
||||
|
||||
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}"
|
||||
CACHE STRING
|
||||
"Flags used by the compiler during all builds." FORCE)
|
||||
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG}"
|
||||
CACHE STRING
|
||||
"Flags used by the compiler during debug builds." FORCE)
|
||||
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE}"
|
||||
CACHE STRING
|
||||
"Flags used by the compiler during release builds." FORCE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(DEFINED CMAKE_Fortran_COMPILER_ID)
|
||||
save_compiler_flags(Fortran)
|
||||
endif()
|
||||
|
||||
if(DEFINED CMAKE_C_COMPILER_ID)
|
||||
save_compiler_flags(C)
|
||||
endif()
|
||||
|
||||
if(DEFINED CMAKE_CXX_COMPILER_ID)
|
||||
save_compiler_flags(CXX)
|
||||
endif()
|
Reference in New Issue
Block a user