Commit 442f285b authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'master' into fix/cpc-review

parents 5678c689 79648ed8
......@@ -17,7 +17,10 @@ LIST(GET NEKVERLIST 1 NEKTAR_VERSION_MINOR)
LIST(GET NEKVERLIST 2 NEKTAR_VERSION_PATCH)
SET(NEKTAR_VERSION ${NEKTAR_VERSION_MAJOR}.${NEKTAR_VERSION_MINOR}.${NEKTAR_VERSION_PATCH})
# Add support for CMAKE_DEPENDENT_OPTION
INCLUDE(CMakeDependentOption)
# Enable CTest.
ENABLE_TESTING()
# Use the CMake 2.4 policy for CMake 2.6
......@@ -33,27 +36,30 @@ ENDIF(COMMAND cmake_policy)
# Find the modules included with Nektar
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
IF( NOT NEKTAR_PASSED_FIRST_CONFIGURE )
IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
ENDIF()
# Set default install path if not provided on the command-line
IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
ENDIF()
# Attempt to retrieve git branch and SHA1 hash
# Attempt to retrieve git branch and SHA1 hash of current changeset.
INCLUDE(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
SET(LIB_DIR "lib/nektar++")
# Set library, binary, include, share and doc paths.
SET(LIB_DIR "lib/nektar++-${NEKTAR_VERSION}")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT APPLE )
SET(LIB_DIR "lib64/nektar++")
SET(LIB_DIR "lib64/nektar++-${NEKTAR_VERSION}")
ENDIF()
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
SET(NEKTAR_BIN_DIR bin)
SET(NEKTAR_LIB_DIR ${LIB_DIR})
SET(NEKTAR_INCLUDE_DIR include/nektar++)
SET(NEKTAR_SHARE_DIR share/nektar++)
SET(NEKTAR_DOC_DIR share/doc/nektar++)
SET(NEKTAR_INCLUDE_DIR include/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_SHARE_DIR share/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_DOC_DIR share/doc/nektar++-${NEKTAR_VERSION})
# Build shared libraries.
SET(NEKTAR_LIBRARY_TYPE "SHARED")
# Set up RPATH
......@@ -88,7 +94,7 @@ OPTION(NEKTAR_BUILD_TIMINGS "Build benchmark timing codes." OFF)
OPTION(NEKTAR_BUILD_PACKAGES "Build Nektar++ binary packages" OFF)
MARK_AS_ADVANCED(NEKTAR_BUILD_PACKAGES)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
# Build options
OPTION(NEKTAR_FULL_DEBUG "Enable Full Debugging." OFF)
......@@ -99,9 +105,8 @@ IF (${CMAKE_COMPILER_IS_GNUCXX})
MARK_AS_ADVANCED(NEKTAR_ENABLE_PROFILE)
ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
SET(ExpressionTemplateDefault OFF)
OPTION(NEKTAR_USE_EXPRESSION_TEMPLATES
"Use Expression templates." ${ExpressionTemplateDefault})
"Use Expression templates." OFF)
MARK_AS_ADVANCED(NEKTAR_USE_EXPRESSION_TEMPLATES)
# BLAS Support
......@@ -124,16 +129,11 @@ CMAKE_DEPENDENT_OPTION(NEKTAR_USE_SYSTEM_BLAS_LAPACK
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_ACCELERATE_FRAMEWORK
"Use the Mac Accelerate Framework for BLAS and Lapack support." ON
"NEKTAR_USE_BLAS_LAPACK; APPLE" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_CHUD_FRAMEWORK
"Use the Mac CHUD Framework (for Shark support)." OFF
"APPLE" OFF)
MARK_AS_ADVANCED(NEKTAR_USE_CHUD_FRAMEWORK)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_DIRECT_BLAS_CALLS
"Use direct BLAS calls rather than NekMatrix calls in the StdRegions and
LocalRegions sublibrary" ON
"NEKTAR_USE_BLAS_LAPACK" OFF)
MARK_AS_ADVANCED(NEKTAR_USE_DIRECT_BLAS_CALLS)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_WIN32_LAPACK
"Use Win32 Lapack provided with the Third Party Distribution."
ON "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
# Memory pools
OPTION(NEKTAR_USE_MEMORY_POOLS
"Use memory pools to accelerate memory allocation." ON)
MARK_AS_ADVANCED(NEKTAR_USE_MEMORY_POOLS)
......@@ -147,27 +147,29 @@ IF (MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ENDIF()
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_WIN32_LAPACK
"Use Win32 Lapack provided with the Third Party Distribution."
ON "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
# Include Nektar++ common macros
INCLUDE (NektarCommon)
# Find Libraries
SET(TPURL http://www.nektar.info/thirdparty)
SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
# Set various ThirdParty locations
SET(TPURL http://www.nektar.info/thirdparty)
SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
SET(TPBUILD ${CMAKE_BINARY_DIR}/ThirdParty)
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
SET(TPINC ${CMAKE_INSTALL_PREFIX}/include/ThirdParty)
SET(TPLIB ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR})
# Create ThirdParty source directory if it doesn't exist already.
IF (NOT EXISTS ${TPSRC})
FILE(MAKE_DIRECTORY ${TPSRC})
ENDIF ()
# Find ThirdParty libraries and headers.
INCLUDE (ThirdPartyTinyxml)
INCLUDE (ThirdPartyLoki)
INCLUDE (ThirdPartyMetis)
INCLUDE (ThirdPartyScotch)
INCLUDE (ThirdPartyBoost)
INCLUDE (ThirdPartyZlib)
INCLUDE (ThirdPartyBoost)
INCLUDE (ThirdPartyFFTW)
INCLUDE (ThirdPartyArpack)
INCLUDE (ThirdPartyMPI)
......@@ -200,11 +202,6 @@ IF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
INCLUDE (FindAccelerateFramework)
ENDIF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
IF( NEKTAR_USE_CHUD_FRAMEWORK )
INCLUDE (FindCHUDFramework)
ADD_DEFINITIONS(-DNEKTAR_USING_CHUD)
ENDIF( NEKTAR_USE_CHUD_FRAMEWORK )
IF( NEKTAR_USE_ACML )
INCLUDE (FindACML)
SET(NEKTAR_USING_BLAS TRUE)
......@@ -272,7 +269,7 @@ IF (NEKTAR_BUILD_LIBRARY)
MultiRegions)
INCLUDE_DIRECTORIES(library)
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR})
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake)
ENDIF (NEKTAR_BUILD_LIBRARY)
IF (NEKTAR_BUILD_SOLVERS)
......@@ -293,27 +290,20 @@ IF (NEKTAR_BUILD_TESTS)
ENDIF (NEKTAR_USE_MPI)
ENDIF (NEKTAR_BUILD_TESTS)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Nektar++Config.cmake.in
SET(NEKTAR_DEFINITIONS "")
GET_DIRECTORY_PROPERTY(
NEKTAR_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
FOREACH(def ${NEKTAR_DEFINITIONS_LIST})
SET(NEKTAR_DEFINITIONS "${NEKTAR_DEFINITIONS} -D${def}")
ENDFOREACH()
# Write out Nektar++ build configuration
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Nektar++Config.cmake.in
${CMAKE_BINARY_DIR}/Nektar++Config.cmake @ONLY)
INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
${CMAKE_SOURCE_DIR}/cmake/FindLoki.cmake
${CMAKE_SOURCE_DIR}/cmake/FindAccelerateFramework.cmake
${CMAKE_SOURCE_DIR}/cmake/FindCHUDFramework.cmake
${CMAKE_SOURCE_DIR}/cmake/FindACML.cmake
${CMAKE_SOURCE_DIR}/cmake/FindArpack.cmake
${CMAKE_SOURCE_DIR}/cmake/FindOpenBlas.cmake
${CMAKE_SOURCE_DIR}/cmake/FindNativeBlasLapack.cmake
${CMAKE_SOURCE_DIR}/cmake/FindMKL.cmake
${CMAKE_SOURCE_DIR}/cmake/FindMetis.cmake
${CMAKE_SOURCE_DIR}/cmake/FindScotch.cmake
${CMAKE_SOURCE_DIR}/cmake/FindFFTW.cmake
${CMAKE_SOURCE_DIR}/cmake/FindWin32Lapack.cmake
${CMAKE_SOURCE_DIR}/cmake/FindTinyXml.cmake
${CMAKE_SOURCE_DIR}/cmake/FindGSMPI.cmake
${CMAKE_SOURCE_DIR}/cmake/FindXXT.cmake
${CMAKE_SOURCE_DIR}/cmake/FindSMV.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX})
# Install Nektar++ CMake configuration file
INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
DESTINATION ${NEKTAR_LIB_DIR}/cmake/)
# Install ThirdParty headers to subdirectory of ${NEKTAR_INCLUDE_DIR}
INSTALL(DIRECTORY ${TPDIST}/include/
......@@ -327,9 +317,6 @@ INSTALL(DIRECTORY ${TPDIST}/lib/
COMPONENT ThirdParty
)
SET(NEKTAR_PASSED_FIRST_CONFIGURE ON CACHE BOOL INTERNAL)
MARK_AS_ADVANCED(NEKTAR_PASSED_FIRST_CONFIGURE)
IF(NEKTAR_BUILD_PACKAGES)
add_subdirectory(pkg)
ENDIF(NEKTAR_BUILD_PACKAGES)
......
......@@ -36,10 +36,6 @@ RESET_VAR_IF_CHANGED( ACML_SEARCH_PATHS ACML_USE_SHARED_LIBRARIES)
SET(ACML_BASE_SEARCH_PATHS "/opt/acml" "C:\\AMD\\acml" "C:\\Program Files\\AMD\\acml")
SET(ACML_SEARCH_PATHS "")
# The various supported versions. When new versions come out this will need
# to be updated to allow automatic detection.
SET(ACML_VERSIONS 4.2.0 4.1.0 4.0.0 3.5.0 3.6.0 3.6.1)
SET(MP_COMPILER_VERSIONS gfortran64_mp gfortran64_mp_int64 pgi32_mp ifort32_mp)
SET(COMPILER_VERSIONS gfortran64 gfortran64_int64 pgi32 ifort32)
......@@ -52,17 +48,19 @@ ELSE( ACML_USE_OPENMP_LIBRARIES )
ENDIF( ACML_USE_OPENMP_LIBRARIES )
FOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})
FOREACH(version_iter ${ACML_VERSIONS})
FILE( GLOB install_path ${path_iter}*/ACML-EULA.txt )
IF (install_path)
LIST( GET install_path 0 install_path)
GET_FILENAME_COMPONENT( install_path ${install_path} PATH)
FOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
LIST(APPEND ACML_SEARCH_PATHS ${path_iter}${version_iter}/${compiler_iter}/include)
LIST(APPEND ACML_SEARCH_PATHS
${install_path}/${compiler_iter}/include)
ENDFOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
ENDFOREACH(version_iter ${ACML_VERSIONS})
ENDIF (install_path)
ENDFOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})
#MESSAGE(${ACML_SEARCH_PATHS})
FIND_PATH(ACML_INCLUDE_PATH acml.h ${ACML_SEARCH_PATHS} )
SET(ACML_LIB_PATH ${ACML_INCLUDE_PATH}/../lib)
#MESSAGE(${ACML_LIB_PATH})
IF( ACML_USE_SHARED_LIBRARIES )
IF( ACML_USE_OPENMP_LIBRARIES )
......@@ -100,5 +98,6 @@ ELSE(ACML_FOUND)
ENDIF (ACML_FIND_REQUIRED)
ENDIF (ACML_FOUND)
MARK_AS_ADVANCED(ACML ACML_INCLUDE_PATH ACML_SEARCH_PATHS
ACML_USE_OPENMP_LIBRARIES ACML_USE_SHARED_LIBRARIES)
SET(ARPACK_SEARCH_PATHS ${CMAKE_SOURCE_DIR} /opt/local/lib/ ThirdParty/ARPACK
${CMAKE_SOURCE_DIR}/ThirdParty/build/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/build/dist/lib )
FIND_LIBRARY(ARPACK_LIB NAMES arpack.1 arpack PATHS ${ARPACK_SEARCH_PATHS})
SET(ARPACK_FOUND FALSE)
IF (ARPACK_LIB)
SET(ARPACK_FOUND TRUE)
MARK_AS_ADVANCED(ARPACK_LIB)
ENDIF (ARPACK_LIB)
IF (ARPACK_FOUND)
IF (NOT ARPACK_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found Arpack : ${ARPACK_LIB}")
GET_FILENAME_COMPONENT(ARPACK_PATH ${ARPACK_LIB} PATH CACHE)
SET(ARPACK_INCLUDE_DIR ${ARPACK_PATH}/../include CACHE FILEPATH "ARPACK include directory.")
MARK_AS_ADVANCED(ARPACK_PATH)
MARK_AS_ADVANCED(ARPACK_INCLUDE_DIR)
ENDIF (NOT ARPACK_LIB_FIND_QUIETLY)
ELSE(ARPACK_FOUND)
IF (ARPACK_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Arpack")
ENDIF (ARPACK_LIB_FIND_REQUIRED)
ENDIF (ARPACK_FOUND)
FIND_PATH(CHUD_FRAMEWORK_INCLUDE_DIR cblas.h /usr/include /usr/local/include
/System/Library/Frameworks/vecLib.framework/Versions/A/Headers/ )
MARK_AS_ADVANCED(CHUD_FRAMEWORK_INCLUDE_DIR)
SET( CHUD_FRAMEWORK_LINK_FLAGS "-framework CHUD" )
IF (CHUD_FRAMEWORK_FOUND)
IF (NOT CHUD_FRAMEWORK_FIND_QUIETLY)
MESSAGE(STATUS "Found CHUD_FRAMEWORK: ${CHUD_FRAMEWORK_INCLUDE_DIR}")
ENDIF (NOT CHUD_FRAMEWORK_FIND_QUIETLY)
ELSE(CHUD_FRAMEWORK_FOUND)
IF (CHUD_FRAMEWORK_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find CHUD_FRAMEWORK")
ENDIF (CHUD_FRAMEWORK_FIND_REQUIRED)
ENDIF (CHUD_FRAMEWORK_FOUND)
SET(FFTW_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/fftw-3.2.2/
${CMAKE_SOURCE_DIR}/ThirdParty/fftw-3.2.2/lib/
${CMAKE_SOURCE_DIR}/../ThirdParty/fftw-3.2.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/fftw-3.2.2/lib/
${CMAKE_SOURCE_DIR}/ThirdParty/build/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/build/dist/lib
$ENV{LD_LIBRARY_PATH} $ENV{FFTW_HOME}/lib )
FIND_LIBRARY(FFTW_LIB NAMES fftw3 fftw3f PATHS ${FFTW_SEARCH_PATHS})
SET(FFTW_FOUND FALSE)
IF (FFTW_LIB)
SET(FFTW_FOUND TRUE)
MARK_AS_ADVANCED(FFTW_LIB)
ENDIF (FFTW_LIB)
IF (FFTW_FOUND)
IF (NOT FFTW_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found FFTW: ${FFTW_LIB}")
GET_FILENAME_COMPONENT(FFTW_PATH ${FFTW_LIB} PATH CACHE)
SET(FFTW_INCLUDE_DIR ${FFTW_PATH}/../include CACHE FILEPATH "FFTW include directory.")
MARK_AS_ADVANCED(FFTW_PATH)
MARK_AS_ADVANCED(FFTW_INCLUDE_DIR)
ENDIF (NOT FFTW_LIB_FIND_QUIETLY)
ELSE(FFTW_FOUND)
IF (FFTW_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find FFTW")
ENDIF (FFTW_LIB_FIND_REQUIRED)
ENDIF (FFTW_FOUND)
# Use LOKI_ADDITIONAL_INCLUDE_DIRS to add additional search directories.
FIND_PATH(LOKI_INCLUDE_DIR loki/Typelist.h
${LOKI_ADDITIONAL_INCLUDE_DIRS}
/usr/include
/usr/local/include
${CMAKE_SOURCE_DIR}/ThirdParty/loki/include/
${CMAKE_SOURCE_DIR}/ThirdParty/loki-0.1.3/include
${CMAKE_SOURCE_DIR}/ThirdParty/loki-0.1.3/loki-0.1.3/include
${CMAKE_SOURCE_DIR}/../ThirdParty/loki/include/
${CMAKE_SOURCE_DIR}/../ThirdParty/loki-0.1.3/include/
${CMAKE_SOURCE_DIR}/../ThirdParty/loki-0.1.3/loki-0.1.3/include
"C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include"
"C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include"
)
IF (LOKI_INCLUDE_DIR)
SET(LOKI_FOUND TRUE)
ENDIF (LOKI_INCLUDE_DIR)
SET (LOKI_LIB_DIR ${LOKI_INCLUDE_DIR}../lib )
IF (LOKI_FOUND)
IF (NOT Loki_FIND_QUIETLY)
MESSAGE(STATUS "Found Loki: ${LOKI_INCLUDE_DIR}")
ENDIF (NOT Loki_FIND_QUIETLY)
ELSE(LOKI_FOUND)
IF (Loki_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Loki")
ENDIF (Loki_FIND_REQUIRED)
ENDIF (LOKI_FOUND)
MARK_AS_ADVANCED(LOKI_INCLUDE_DIR)
MARK_AS_ADVANCED(LOKI_LIB_DIR)
SET(METIS_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/metis-5.0.2/
${CMAKE_SOURCE_DIR}/ThirdParty/metis-5.0.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/metis-5.0.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/metis-5.0.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(METIS_LIB NAMES metis PATHS ${METIS_SEARCH_PATHS})
SET(METIS_FOUND FALSE)
IF (METIS_LIB)
SET(METIS_FOUND TRUE)
GET_FILENAME_COMPONENT(METIS_PATH ${METIS_LIB} PATH)
INCLUDE_DIRECTORIES(${METIS_PATH}/../include)
MARK_AS_ADVANCED(METIS_PATH)
MARK_AS_ADVANCED(METIS_LIB)
ENDIF (METIS_LIB)
IF (METIS_FOUND)
IF (NOT METIS_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found Metis: ${METIS_LIB}")
ENDIF (NOT METIS_LIB_FIND_QUIETLY)
ELSE(METIS_FOUND)
IF (METIS_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Metis")
ENDIF (METIS_LIB_FIND_REQUIRED)
ENDIF (METIS_FOUND)
SET(SCOTCH_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/scotch_6.0.0/
${CMAKE_SOURCE_DIR}/ThirdParty/scotch_6.0.0/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/scotch_6.0.0/
${CMAKE_SOURCE_DIR}/../ThirdParty/scotch_6.0.0/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(SCOTCH_LIB NAMES scotch PATHS ${SCOTCH_SEARCH_PATHS})
FIND_LIBRARY(SCOTCHERR_LIB NAMES scotcherr PATHS ${SCOTCH_SEARCH_PATHS})
SET(SCOTCH_FOUND FALSE)
IF (SCOTCH_LIB AND SCOTCHERR_LIB)
SET(SCOTCH_FOUND TRUE)
GET_FILENAME_COMPONENT(SCOTCH_PATH ${SCOTCH_LIB} PATH)
INCLUDE_DIRECTORIES(${SCOTCH_PATH}/../include)
MARK_AS_ADVANCED(SCOTCH_PATH)
MARK_AS_ADVANCED(SCOTCH_LIB)
MARK_AS_ADVANCED(SCOTCHERR_LIB)
ENDIF (SCOTCH_LIB AND SCOTCHERR_LIB)
IF (SCOTCH_FOUND)
IF (NOT SCOTCH_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found Scotch: ${SCOTCH_LIB}, ${SCOTCHERR_LIB}")
ENDIF (NOT SCOTCH_LIB_FIND_QUIETLY)
ELSE(SCOTCH_FOUND)
IF (SCOTCH_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Scotch")
ENDIF (SCOTCH_LIB_FIND_REQUIRED)
ENDIF (SCOTCH_FOUND)
# Use TINYXML_ADDITIONAL_INCLUDE_DIRS to customize search.
GET_FILENAME_COMPONENT(FIRST_THIRD_PARTY_INCLUDE ${CMAKE_SOURCE_DIR}/ThirdParty ABSOLUTE)
GET_FILENAME_COMPONENT(SECOND_THIRD_PARTY_INCLUDE ${CMAKE_SOURCE_DIR}/../ThirdParty ABSOLUTE)
FIND_PATH(TINYXML_BASE tinyxml/tinyxml.h
${TINYXML_ADDITIONAL_INCLUDE_DIRS}
/usr/include /usr/local/include
${FIRST_THIRD_PARTY_INCLUDE} ${SECOND_THIRD_PARTY_INCLUDE} )
IF (TINYXML_BASE)
SET(TINYXML_FOUND TRUE)
ENDIF (TINYXML_BASE)
#FILE(TO_CMAKE_PATH ${TINYXML_BASE}/lib TINYXMLM_LIB_DIR)
#FILE(TO_CMAKE_PATH ${TINYXML_BASE}/tinyxml TINYXML_SRC_DIR)
#FILE(TO_CMAKE_PATH ${TINYXML_BASE}/tinyxml TINYXML_INCLUDE_DIR)
SET (TINYXML_LIB_DIR ${TINYXML_BASE}/lib )
SET (TINYXML_SRC_DIR ${TINYXML_BASE}/tinyxml)
SET (TINYXML_INCLUDE_DIR ${TINYXML_BASE}/tinyxml)
MARK_AS_ADVANCED(TINYXML_BASE)
IF (TINYXML_FOUND)
IF (NOT TINYXML_FIND_QUIETLY)
MESSAGE(STATUS "Found TinyXML: ${TINYXML_INCLUDE_DIR}")
ENDIF (NOT TINYXML_FIND_QUIETLY)
ELSE(TINYXML_FOUND)
IF (TINYXML_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find TinyXML")
ENDIF (TINYXML_FIND_REQUIRED)
ENDIF (TINYXML_FOUND)
......@@ -32,83 +32,79 @@ SET(NEKTAR++_VERSION "@NEKTAR_VERSION@")
SET(NEKTAR++_ROOT_DIR "@CMAKE_INSTALL_PREFIX@")
SET(NEKTAR++_INCLUDE_DIRS "${NEKTAR++_ROOT_DIR}/@NEKTAR_INCLUDE_DIR@")
SET(NEKTAR++_LIBRARY_DIRS "${NEKTAR++_ROOT_DIR}/@NEKTAR_LIB_DIR@")
SET(NEKTAR++_DEFINITIONS "")
SET(NEKTAR++_LIBRARIES SolverUtils MultiRegions LocalRegions SpatialDomains StdRegions LibUtilities)
SET(NEKTAR++_DEFINITIONS @NEKTAR_DEFINITIONS@)
SET(NEKTAR++_LIBRARIES @NEKTAR++_LIBRARIES@)
SET(NEKTAR++_TP_INCLUDE_DIRS "${NEKTAR++_ROOT_DIR}/@NEKTAR_INCLUDE_DIR@/ThirdParty")
SET(NEKTAR++_TP_INCLUDE_DIRS
"${NEKTAR++_ROOT_DIR}/@NEKTAR_INCLUDE_DIR@/ThirdParty")
SET(NEKTAR++_TP_LIBRARIES "")
SET(NEKTAR++_TP_LIBRARY_DIRS "")
# add Nektar++_ROOT_DIR to the cmake search path, so Nektars custom FindXXX modules can be used
SET(CMAKE_MODULE_PATH ${NEKTAR++_ROOT_DIR} ${CMAKE_MODULE_PATH})
# Set up Boost and other ThirdParty include directories.
SET(Boost_INCLUDE_DIRS "@Boost_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
# set nektars config variables
SET(NEKTAR_USE_MEMORY_POOLS "@NEKTAR_USE_MEMORY_POOLS@")
IF( NEKTAR_USE_MEMORY_POOLS )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_MEMORY_POOL_ENABLED")
ENDIF( NEKTAR_USE_MEMORY_POOLS )
SET(Boost_LIBRARIES @Boost_LIBRARIES@)
SET(Boost_LIBRARY_DIRS "@Boost_CONFIG_LIBRARY_DIR@")
SET(NEKTAR++_TP_LIBRARIES
${NEKTAR++_TP_LIBRARIES} ${Boost_LIBRARIES})
SET(NEKTAR_USE_SMV "@NEKTAR_USE_SMV@")
IF( NEKTAR_USE_SMV )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_USING_SMV")
ENDIF( NEKTAR_USE_SMV )
SET(LOKI_INCLUDE_DIRS "@LOKI_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${LOKI_INCLUDE_DIRS})
SET(NEKTAR_USE_ACML "@NEKTAR_USE_ACML@")
SET(TINYXML_INCLUDE_DIRS "@TINYXML_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIRS})
SET(NEKTAR_USE_ACML "@NEKTAR_USE_EXPRESSION_TEMPLATES@")
IF( NEKTAR_USE_EXPRESSION_TEMPLATES )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_USE_EXPRESSION_TEMPLATES")
ENDIF( NEKTAR_USE_EXPRESSION_TEMPLATES )
SET(NEKTAR_USE_WIN32_LAPACK "@NEKTAR_USE_WIN32_LAPACK@")
IF( NEKTAR_USE_WIN32_LAPACK )
GET_FILENAME_COMPONENT(WIN32_BLAS_PATH "@WIN32_BLAS@" PATH)
GET_FILENAME_COMPONENT(WIN32_LAPACK_PATH "@WIN32_LAPACK@" PATH)
ENDIF( NEKTAR_USE_WIN32_LAPACK )
SET(NEKTAR_USE_BLAS_LAPACK "@NEKTAR_USE_BLAS_LAPACK@")
IF( NEKTAR_USE_BLAS_LAPACK )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_USING_LAPACK -DNEKTAR_USING_BLAS")
ENDIF( NEKTAR_USE_BLAS_LAPACK )
SET(NEKTAR_FULL_DEBUG "@NEKTAR_FULL_DEBUG@")
IF ( NEKTAR_FULL_DEBUG )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_FULLDEBUG")
ENDIF( NEKTAR_FULL_DEBUG)
SET(Boost_INCLUDE_DIRS "@Boost_INCLUDE_DIRS@")
SET(Boost_LIBRARIES "@Boost_LIBRARIES@")
SET(Boost_LIBRARY_DIRS "@Boost_LIBRARY_DIRS@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
SET(NEKTAR++_TP_LIBRARIES ${NEKTAR++_TP_LIBRARIES} ${Boost_LIBRARIES})
SET(ZLIB_INCLUDE_DIRS "@ZLIB_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
SET(NEKTAR_USE_MPI "@NEKTAR_USE_MPI@")
SET(MPI_LIBRARY "@MPI_LIBRARY@")
SET(MPI_EXTRA_LIBRARY "@MPI_EXTRA_LIBRARY@")
SET(MPI_INCLUDE_PATH "@MPI_INCLUDE_PATH@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${MPI_INCLUDE_PATH})
SET(NEKTAR++_TP_LIBRARIES ${NEKTAR++_TP_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
IF( NEKTAR_USE_MPI )
SET(NEKTAR++_DEFINITIONS "${NEKTAR++_DEFINITIONS} -DNEKTAR_USE_MPI")
SET(MPI_LIBRARY "@MPI_LIBRARY@")
SET(MPI_EXTRA_LIBRARY "@MPI_EXTRA_LIBRARY@")
SET(MPI_INCLUDE_PATH "@MPI_INCLUDE_PATH@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${MPI_INCLUDE_PATH})
SET(NEKTAR++_TP_LIBRARIES
${NEKTAR++_TP_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
SET(NEKTAR++_DEFINITIONS
"${NEKTAR++_DEFINITIONS} -DNEKTAR_USE_MPI")
ENDIF( NEKTAR_USE_MPI )
SET(LOKI_ADDITIONAL_INCLUDE_DIRS "@LOKI_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${LOKI_ADDITIONAL_INCLUDE_DIRS})
SET(TINYXML_ADDITIONAL_INCLUDE_DIRS "@TINYXML_BASE@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${TINYXML_ADDITIONAL_INCLUDE_DIRS})
SET(FFTW_INCLUDE_DIR "@FFTW_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${FFTW_INCLUDE_DIR})
SET(ARPACK_INCLUDE_DIR "@ARPACK_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${ARPACK_INCLUDE_DIR})
SET(VTK_INCLUDE_DIRS "@VTK_INCLUDE_DIRS@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS})
SET(NEKTAR_USE_SCOTCH "@NEKTAR_USE_SCOTCH@")
IF( NEKTAR_USE_SCOTCH )
SET(SCOTCH_INCLUDE_DIRS "@SCOTCH_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${SCOTCH_INCLUDE_DIRS})
ENDIF( NEKTAR_USE_SCOTCH )
SET(NEKTAR_USE_FFTW "@NEKTAR_USE_FFTW@")
IF( NEKTAR_USE_FFTW )
SET(FFTW_INCLUDE_DIR "@FFTW_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${FFTW_INCLUDE_DIR})
ENDIF( NEKTAR_USE_FFTW )
SET(NEKTAR_USE_ARPACK "@NEKTAR_USE_ARPACK@")
IF( NEKTAR_USE_ARPACK )
SET(ARPACK_INCLUDE_DIR "@ARPACK_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${ARPACK_INCLUDE_DIR})
ENDIF( NEKTAR_USE_ARPACK )
SET(NEKTAR_USE_VTK "@NEKTAR_USE_VTK@")
IF( NEKTAR_USE_VTK )
SET(VTK_INCLUDE_DIRS "@VTK_INCLUDE_DIRS@")
SET(NEKTAR++_TP_INCLUDE_DIRS
${NEKTAR++_TP_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS})
ENDIF( NEKTAR_USE_VTK )
# find and add Nektar++ libraries
INCLUDE(${NEKTAR++_LIBRARY_DIRS}/Nektar++Libraries.cmake)
INCLUDE(${NEKTAR++_LIBRARY_DIRS}/cmake/Nektar++Libraries.cmake)
# platform dependent options
if(${CMAKE_SYSTEM} MATCHES "Linux.*")
......
# Arpack
########################################################################
#
# ThirdParty configuration for Nektar++
#
# ARPACK
#
########################################################################
OPTION(NEKTAR_USE_ARPACK
"Use Arpack routines for evaluating the eigenvalues and eigenvectors" OFF)
"Use Arpack routines for evaluating eigenvalues and eigenvectors" OFF)
IF (NEKTAR_USE_ARPACK)
FIND_LIBRARY(ARPACK_LIBRARY NAMES "arpack.1" "arpack" PATHS /opt/local/lib)
IF( NEKTAR_USE_ARPACK )
INCLUDE (FindArpack)
INCLUDE_DIRECTORIES(${ARPACK_INCLUDE_DIR})
ADD_DEFINITIONS(-DNEKTAR_USING_ARPACK)
ENDIF( NEKTAR_USE_ARPACK)
IF (ARPACK_LIBRARY)
MESSAGE(STATUS "Found Arpack: ${ARPACK_LIBRARY}")
MARK_AS_ADVANCED(ARPACK_LIBRARY)
ELSE()
MESSAGE(FATAL_ERROR "Could not find Arpack")
ENDIF()