Commit 8a1a60d4 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'master' into feature/cardiac-benchmark

Conflicts:
	library/SolverUtils/Filters/FilterThresholdMax.cpp
parents 71edd89f 1b4cb847
......@@ -28,16 +28,18 @@ 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 )
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
ENDIF()
ENDIF()
# Attempt to retrieve git branch and SHA1 hash
INCLUDE(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
SET(LIB_DIR "lib")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
SET(LIB_DIR "lib64")
SET(LIB_DIR "lib/nektar++")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT APPLE )
SET(LIB_DIR "lib64/nektar++")
ENDIF()
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
......@@ -52,12 +54,23 @@ SET(NEKTAR_LIBRARY_TYPE "SHARED")
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
IF (APPLE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
ENDIF()
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
ENDIF("${isSystemDir}" STREQUAL "-1")
# Get rid of OS X RPATH warnings -- we should set this to 1 once we reach
# required minimum cmake version of 3.0.0 and configure it in a more sane
# fashion.
IF(NOT DEFINED CMAKE_MACOSX_RPATH)
SET(CMAKE_MACOSX_RPATH 0)
ENDIF()
# Components of the Nektar++ package to build
OPTION(NEKTAR_BUILD_LIBRARY "Build main Nektar++ libraries." ON)
OPTION(NEKTAR_BUILD_DEMOS "Build demonstration codes." ON)
......@@ -119,38 +132,18 @@ OPTION(NEKTAR_USE_MEMORY_POOLS
"Use memory pools to accelerate memory allocation." ON)
MARK_AS_ADVANCED(NEKTAR_USE_MEMORY_POOLS)
# Turn on NEKTAR_USE_WIN32_LAPACK if we are in Windows and the libraries exist.
IF( WIN32 )
IF( CMAKE_CL_64 )
FIND_LIBRARY( WIN32_BLAS NAMES libblas64 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
FIND_LIBRARY( WIN32_LAPACK NAMES liblapack64 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
ELSE()
FIND_LIBRARY( WIN32_BLAS NAMES blas_win32 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
FIND_LIBRARY( WIN32_LAPACK NAMES lapack_win32 PATHS ${CMAKE_SOURCE_DIR}/ThirdParty ${CMAKE_SOURCE_DIR}/../ThirdParty )
ENDIF()
IF (MSVC)
# Needed for M_PI to be visible in visual studio.
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
IF( WIN32_BLAS AND WIN32_LAPACK )
SET(Win32LapackDefault ON)
ELSE(WIN32_BLAS AND WIN32_LAPACK)
SET(Win32LapackDefault OFF)
ENDIF(WIN32_BLAS AND WIN32_LAPACK)
ELSE(WIN32)
SET(Win32LapackDefault OFF)
ENDIF(WIN32)
IF( MSVC )
# Needed for M_PI to be visible in visual studio.
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
# Removes the warnings about unsafe methods such as strcpy, std::copy,
# Removes the warnings about unsafe methods such as strcpy, std::copy,
# memcmp, etc.
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ENDIF( )
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."
${Win32LapackDefault} "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
ON "NEKTAR_USE_BLAS_LAPACK; WIN32" OFF)
# Include Nektar++ common macros
INCLUDE (NektarCommon)
......@@ -159,7 +152,7 @@ INCLUDE (NektarCommon)
SET(TPURL http://www.nektar.info/thirdparty)
SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
SET(TPBUILD ${CMAKE_BINARY_DIR}/ThirdParty)
SET(TPDIST ${CMAKE_INSTALL_PREFIX})
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
IF (NOT EXISTS ${TPSRC})
FILE(MAKE_DIRECTORY ${TPSRC})
ENDIF ()
......@@ -289,6 +282,9 @@ ENDIF (NEKTAR_BUILD_UTILITIES)
IF (NEKTAR_BUILD_TESTS)
INCLUDE_DIRECTORIES(tests)
ADD_SUBDIRECTORY(tests)
IF (NEKTAR_USE_MPI)
OPTION(NEKTAR_TEST_FORCEMPIEXEC "Force all tests to be run through the MPI job launcher." OFF)
ENDIF (NEKTAR_USE_MPI)
ENDIF (NEKTAR_BUILD_TESTS)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/Nektar++Config.cmake.in
......@@ -305,13 +301,25 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.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/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})
DESTINATION ${CMAKE_INSTALL_PREFIX})
# Install ThirdParty headers to subdirectory of ${NEKTAR_INCLUDE_DIR}
INSTALL(DIRECTORY ${TPDIST}/include/
DESTINATION ${NEKTAR_INCLUDE_DIR}/ThirdParty
COMPONENT ThirdParty
)
# Install ThirdParty libraries into ${NEKTAR_LIB_DIR}
INSTALL(DIRECTORY ${TPDIST}/lib/
DESTINATION ${NEKTAR_LIB_DIR}
COMPONENT ThirdParty
)
SET(NEKTAR_PASSED_FIRST_CONFIGURE ON CACHE BOOL INTERNAL)
MARK_AS_ADVANCED(NEKTAR_PASSED_FIRST_CONFIGURE)
......
IF( WIN32 AND CMAKE_CL_64 )
FIND_LIBRARY( WIN32_BLAS NAMES libblas64 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
FIND_LIBRARY( WIN32_LAPACK NAMES liblapack64 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
ELSE()
FIND_LIBRARY( WIN32_BLAS NAMES blas_win32 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
FIND_LIBRARY( WIN32_LAPACK NAMES lapack_win32 PATHS
${WIN32_LAPACK_ADDITIONAL_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty
${CMAKE_SOURCE_DIR}/../ThirdParty)
ENDIF()
CHANGE_EXTENSION(WIN32_LAPACK_DLL ${WIN32_LAPACK} "dll")
CHANGE_EXTENSION(WIN32_BLAS_DLL ${WIN32_BLAS} "dll")
FIND_LIBRARY(WIN32_BLAS NAMES libblas PATHS ${TPSRC})
FIND_LIBRARY(WIN32_LAPACK NAMES liblapack PATHS ${TPSRC})
IF (NOT WIN32_BLAS OR NOT WIN32_LAPACK)
IF (CMAKE_CL_64)
SET(WIN_ZIP_FILE "win64-blas-lapack.zip")
SET(WIN_ZIP_MD5_VALUE "b5ad4f7335ca964bbdafab129e44a046")
SET(WIN_ZIP_SHA1_VALUE "adb331fa195db264e95e46b902887f12971dbf48")
SET(WIN_ZIP_SHA256_VALUE "0e6e3360cdf577718ee57a6fd27c47bac0391d3c7d373e29a0352505e1dc912b")
ELSE()
SET(WIN_ZIP_FILE "win32-blas-lapack.zip")
SET(WIN_ZIP_MD5_VALUE "6dbf9cced1fb73cc093ccc6560cb46e2")
SET(WIN_ZIP_SHA1_VALUE "39c5deaf17211a5012ccfd9d0258da04a7ceb197")
SET(WIN_ZIP_SHA256_VALUE "6bb347aa717530fa74b71539f331bb4027767d8b25b8a26c741b540c73398a03")
ENDIF()
SET(WIN_ZIP_PATH ${TPSRC}/${WIN_ZIP_FILE})
IF (NOT EXISTS ${WIN_ZIP_PATH})
FILE(DOWNLOAD ${TPURL}/${WIN_ZIP_FILE} ${WIN_ZIP_PATH})
ENDIF()
# Calculate expected MD5 and SHA128 hashes
FILE (MD5 ${WIN_ZIP_PATH} WIN_ZIP_MD5)
FILE (SHA1 ${WIN_ZIP_PATH} WIN_ZIP_SHA1)
FILE (SHA256 ${WIN_ZIP_PATH} WIN_ZIP_SHA256)
STRING(TOLOWER "${WIN_ZIP_MD5}" WIN_ZIP_MD5)
STRING(TOLOWER "${WIN_ZIP_SHA1}" WIN_ZIP_SHA1)
STRING(TOLOWER "${WIN_ZIP_SHA256}" WIN_ZIP_SHA256)
IF ((NOT WIN_ZIP_MD5 STREQUAL WIN_ZIP_MD5_VALUE) OR
(NOT WIN_ZIP_SHA1 STREQUAL WIN_ZIP_SHA1_VALUE) OR
(NOT WIN_ZIP_SHA256 STREQUAL WIN_ZIP_SHA256_VALUE))
MESSAGE(FATAL_ERROR "Security error: Win32 BLAS/LAPACK file has "
"MD5, SHA1 or SHA256 hash")
ENDIF()
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${WIN_ZIP_PATH}
WORKING_DIRECTORY ${TPSRC}
)
# For some reason CMake refuses to run FIND_LIBRARY again so we
# force this to the correct library.
SET(WIN32_BLAS "${TPSRC}/libblas.lib" CACHE FILEPATH "Blas" FORCE)
SET(WIN32_LAPACK "${TPSRC}/liblapack.lib" CACHE FILEPATH "LAPACK" FORCE)
IF (NOT WIN32_BLAS)
MESSAGE(FATAL_ERROR "Could not find BLAS library after unzipping!")
ENDIF()
IF (NOT WIN32_LAPACK)
MESSAGE(FATAL_ERROR "Could not find LAPACK library after unzipping!")
ENDIF()
ENDIF ()
GET_FILENAME_COMPONENT(LAPACK_DIR ${WIN32_LAPACK} PATH CACHE)
LINK_DIRECTORIES(${LAPACK_DIR})
IF (WIN32_BLAS)
SET(WIN32_LAPACK_FOUND ON)
ENDIF (WIN32_BLAS)
IF (WIN32_LAPACK_FOUND)
IF (NOT WIN32_LAPACK_FIND_QUIETLY)
MESSAGE(STATUS "Found WIN32 Lapack: ${WIN32_LAPACK}")
ENDIF (NOT WIN32_LAPACK_FIND_QUIETLY)
ELSE(WIN32_LAPACK_FOUND)
IF (WIN32_LAPACK_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Win32 Lapack")
ENDIF (WIN32_LAPACK_FIND_REQUIRED)
ENDIF (WIN32_LAPACK_FOUND)
MESSAGE(STATUS "Found Win32 BLAS: ${WIN32_BLAS}")
MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")
......@@ -35,9 +35,9 @@ SET(NEKTAR++_LIBRARY_DIRS "${NEKTAR++_ROOT_DIR}/@NEKTAR_LIB_DIR@")
SET(NEKTAR++_DEFINITIONS "")
SET(NEKTAR++_LIBRARIES SolverUtils MultiRegions LocalRegions SpatialDomains StdRegions LibUtilities)
SET(NEKTAR++_TP_INCLUDE_DIRS "")
SET(NEKTAR++_TP_INCLUDE_DIRS "${NEKTAR++_ROOT_DIR}/@NEKTAR_INCLUDE_DIR@/ThirdParty")
SET(NEKTAR++_TP_LIBRARIES "")
SET(NEKTAR++_TP_LIBRARY_DIRS "@CMAKE_SOURCE_DIR@/ThirdParty/dist/lib/")
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})
......
......@@ -6,8 +6,6 @@ ENDMACRO()
MACRO(SET_COMMON_PROPERTIES name)
SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${NEKTAR_VERSION})
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX -g)
SET_TARGET_PROPERTIES(${name} PROPERTIES MINSIZEREL_POSTFIX -ms)
SET_TARGET_PROPERTIES(${name} PROPERTIES RELWITHDEBINFO_POSTFIX -rg)
......@@ -142,7 +140,8 @@ MACRO(ADD_NEKTAR_LIBRARY name component type)
ADD_LIBRARY(${name} ${type} ${ARGN})
SET_PROPERTY(TARGET ${name} PROPERTY FOLDER ${component})
SET_PROPERTY(TARGET ${name} PROPERTY VERSION ${NEKTAR_VERSION})
SET_COMMON_PROPERTIES(${name})
# Set properties for building shared libraries
......
......@@ -3,26 +3,41 @@ SET(Boost_USE_MULTITHREADED ON CACHE BOOL
"Search for multithreaded boost libraries")
MARK_AS_ADVANCED(Boost_USE_MULTITHREADED)
IF (WIN32)
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
ENDIF()
IF (THIRDPARTY_BUILD_BOOST)
INCLUDE(ExternalProject)
# Only build the libraries we need
SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
--with-program_options --with-date_time --with-thread
--with-regex)
IF (NOT WIN32)
# Only build the libraries we need
SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
--with-program_options --with-date_time --with-thread
--with-regex)
# We need -fPIC for 64-bit builds
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
SET(BOOST_FLAGS cxxflags=-fPIC cflags=-fPIC linkflags=-fPIC)
ENDIF ()
# Build Boost
IF (APPLE)
SET(TOOLSET darwin)
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF(APPLE)
ENDIF()
# Build Boost
IF (APPLE)
SET(TOOLSET darwin)
ELSEIF (WIN32)
IF (MSVC10)
SET(TOOLSET msvc-10.0)
ELSEIF (MSVC11)
SET(TOOLSET msvc-11.0)
ELSEIF (MSVC12)
SET(TOOLSET msvc-12.0)
ENDIF()
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF(APPLE)
IF (NOT WIN32)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
......@@ -36,70 +51,85 @@ IF (THIRDPARTY_BUILD_BOOST)
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./bootstrap.sh --prefix=${TPDIST}
BUILD_COMMAND NO_BZIP2=1 ./b2
variant=release
link=shared
include=${TPDIST}/include
linkflags="-L${TPDIST}/lib"
${BOOST_FLAGS} ${BOOST_LIB_LIST}
--layout=system toolset=${TOOLSET} install
variant=release
link=shared
include=${TPDIST}/include
linkflags="-L${TPDIST}/lib"
${BOOST_FLAGS} ${BOOST_LIB_LIST}
--layout=system toolset=${TOOLSET} install
INSTALL_COMMAND ""
)
IF (APPLE)
EXTERNALPROJECT_ADD_STEP(boost patch-install-path
COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPSRC}/boost/tools/build/v2/tools/darwin.jam
DEPENDERS build
DEPENDEES download)
ENDIF (APPLE)
# If building ThirdParty zlib, force zlib build before boost
IF (THIRDPARTY_BUILD_ZLIB)
ADD_DEPENDENCIES(boost zlib-1.2.7)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
SET(Boost_DATE_TIME_LIBRARY boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
SET(Boost_REGEX_LIBRARY boost_regex)
SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
SET(Boost_SYSTEM_LIBRARY boost_system)
SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
SET(Boost_THREAD_LIBRARY boost_thread)
SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include
${TPSRC}/dist/include/boost-1_49)
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
)
ELSE ()
IF (CMAKE_CL_64)
SET(ADDRESS_MODEL 64)
ELSE()
SET(ADDRESS_MODEL 32)
ENDIF()
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_55_0.tar.bz2
URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
STAMP_DIR ${TPSRC}/stamp
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/boost
SOURCE_DIR ${TPBUILD}/boost
BINARY_DIR ${TPBUILD}/boost
TMP_DIR ${TPBUILD}/boost-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND bootstrap.bat --prefix=${TPDIST}/boost
BUILD_COMMAND b2 --layout=system install
CONFIGURE_COMMAND call bootstrap.bat
BUILD_COMMAND b2 variant=release
toolset=${TOOLSET}
address-model=${ADDRESS_MODEL}
link=shared
runtime-link=shared
-s NO_BZIP2=1
-s ZLIB_BINARY=zlib
-s ZLIB_INCLUDE=${TPDIST}/include
-s ZLIB_LIBPATH=${TPDIST}/lib
${BOOST_LIB_LIST}
--layout=system
--prefix=${TPDIST} install
INSTALL_COMMAND ""
)
ENDIF ()
)
ENDIF()
IF (APPLE)
EXTERNALPROJECT_ADD_STEP(boost patch-install-path
COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPSRC}/boost/tools/build/v2/tools/darwin.jam
DEPENDERS build
DEPENDEES download)
ENDIF (APPLE)
# If building ThirdParty zlib, force zlib build before boost
IF (THIRDPARTY_BUILD_ZLIB)
ADD_DEPENDENCIES(boost zlib-1.2.7)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
SET(Boost_DATE_TIME_LIBRARY boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_DEBUG boost_date_time)
SET(Boost_DATE_TIME_LIBRARY_RELEASE boost_date_time)
SET(Boost_FILESYSTEM_LIBRARY boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_DEBUG boost_filesystem)
SET(Boost_FILESYSTEM_LIBRARY_RELEASE boost_filesystem)
SET(Boost_IOSTREAMS_LIBRARY boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_DEBUG boost_iostreams)
SET(Boost_IOSTREAMS_LIBRARY_RELEASE boost_iostreams)
SET(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG boost_program_options)
SET(Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE boost_program_options)
SET(Boost_REGEX_LIBRARY boost_regex)
SET(Boost_REGEX_LIBRARY_DEBUG boost_regex)
SET(Boost_REGEX_LIBRARY_RELEASE boost_regex)
SET(Boost_SYSTEM_LIBRARY boost_system)
SET(Boost_SYSTEM_LIBRARY_DEBUG boost_system)
SET(Boost_SYSTEM_LIBRARY_RELEASE boost_system)
SET(Boost_THREAD_LIBRARY boost_thread)
SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include)
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
ELSE (THIRDPARTY_BUILD_BOOST)
ADD_CUSTOM_TARGET(boost ALL)
SET(Boost_DEBUG 0)
......@@ -123,30 +153,80 @@ ELSE (THIRDPARTY_BUILD_BOOST)
ELSE()
FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
ENDIF()
IF (Boost_IOSTREAMS_FOUND)
MESSAGE(STATUS "Found Boost iostreams library: ${Boost_IOSTREAMS_LIBRARY}")
MESSAGE(STATUS "Found Boost iostreams library: "
"${Boost_IOSTREAMS_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost IOSTREAM library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-iostreams option.")
ENDIF ()
IF (Boost_THREAD_FOUND)
MESSAGE(STATUS "Found Boost thread library: ${Boost_THREAD_LIBRARY}")
MESSAGE(STATUS "Found Boost thread library: "
"${Boost_THREAD_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost THREAD library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-thread option.")
ENDIF ()
IF (Boost_DATE_TIME_FOUND)
MESSAGE(STATUS "Found Boost date_time library: ${Boost_DATE_TIME_LIBRARY}")
MESSAGE(STATUS "Found Boost date_time library: "
"${Boost_DATE_TIME_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost DATE_TIME library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-date_time option.")
ENDIF ()
IF (Boost_FILESYSTEM_FOUND)
MESSAGE(STATUS "Found Boost filesystem library: ${Boost_FILESYSTEM_LIBRARY}")
MESSAGE(STATUS "Found Boost filesystem library: "
"${Boost_FILESYSTEM_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost FILESYSTEM library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-filesystem option.")
ENDIF ()
IF (Boost_SYSTEM_FOUND)
MESSAGE(STATUS "Found Boost system library: ${Boost_SYSTEM_LIBRARY}")
MESSAGE(STATUS "Found Boost system library: "
"${Boost_SYSTEM_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost SYSTEM library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-filesystem option.")
ENDIF ()
IF (Boost_PROGRAM_OPTIONS_FOUND)
MESSAGE(STATUS "Found Boost program_options library: ${Boost_PROGRAM_OPTIONS_LIBRARY}")
MESSAGE(STATUS "Found Boost program_options library: "
"${Boost_PROGRAM_OPTIONS_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost PROGRAM_OPTIONS library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-program_options option.")
ENDIF ()
IF (Boost_REGEX_FOUND)
MESSAGE(STATUS "Found Boost regex library: ${Boost_REGEX_LIBRARY}")
MESSAGE(STATUS "Found Boost regex library: "
"${Boost_REGEX_LIBRARY}")
ELSE ()
MESSAGE(WARNING "Boost REGEX library not found. "
"Please ensure it is installed, or Boost was "
"compiled with the --with-regex option.")
ENDIF ()
IF (BOOST_THREAD_LIBRARY)
MARK_AS_ADVANCED(BOOST_THREAD_LIBRARY)
ENDIF (BOOST_THREAD_LIBRARY)
IF (NOT Boost_FOUND)
MESSAGE(FATAL_ERROR "One of more Boost libraries could not be found. "
"See above warnings. To have CMake automatically "
"build and install the necessary Boost libraries "
"select the THIRDPARTY_BUILD_BOOST option.")
ENDIF ()
ENDIF (THIRDPARTY_BUILD_BOOST)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
......@@ -23,6 +23,18 @@ IF( NEKTAR_USE_MPI )
ELSE()
SET(MPI_BUILTIN ON)
MESSAGE(STATUS "Found MPI: built in")
FIND_PROGRAM(HAVE_APRUN aprun)
IF (HAVE_APRUN)
# Probably on Cray
SET(MPIEXEC "aprun" CACHE STRING "MPI job launching command")
SET(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "MPI job launcher flag to specify number of processes")
ELSE()
SET(MPIEXEC "mpirun" CACHE STRING "MPI job launching command")
SET(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "MPI job launcher flag to specify number of processes")
ENDIF()
MARK_AS_ADVANCED(MPIEXEC)
MARK_AS_ADVANCED(MPIEXEC_NUMPROC_FLAG)
UNSET(HAVE_APRUN CACHE)
ENDIF()
ADD_DEFINITIONS(-DNEKTAR_USE_MPI)
......@@ -40,6 +52,7 @@ IF( NEKTAR_USE_MPI )
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND
${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=Debug
......
......@@ -6,8 +6,8 @@ IF (THIRDPARTY_BUILD_METIS)
EXTERNALPROJECT_ADD(
modmetis-5.1.0
PREFIX ${TPSRC}
URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
URL ${TPURL}/modmetis-5.1.0_2.tar.bz2
URL_MD5 "8a1f1afd39b46a4477c1ea15464cdf89"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/modmetis-5.1.0
......@@ -15,6 +15,7 @@ IF (THIRDPARTY_BUILD_METIS)
TMP_DIR ${TPBUILD}/modmetis-5.1.0-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
......
......@@ -19,6 +19,7 @@ IF (THIRDPARTY_BUILD_TINYXML)
TMP_DIR ${TPBUILD}/tinyxml-2.4.3-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
......
......@@ -21,7 +21,12 @@ IF( NEKTAR_USE_VTK )
BINARY_DIR ${TPBUILD}/vtk-5.10.1
TMP_DIR ${TPBUILD}/vtk-5.10.1-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST} -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release ${TPSRC}/vtk-5.10.1
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=Release
${TPSRC}/vtk-5.10.1
)
SET(VTK_DIR ${TPDIST}/lib/vtk-5.10)
SET(VTK_FOUND 1)
......
......@@ -40,6 +40,7 @@ IF (THIRDPARTY_BUILD_ZLIB)
TMP_DIR ${TPBUILD}/zlib-1.2.7-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}