Commit 910a1b51 authored by Chris Cantwell's avatar Chris Cantwell

Merge branch 'master' into feature/viscoelastic-ALE

Conflicts:
	library/SpatialDomains/Conditions.h
parents 60f9e75f 88446ec9
This diff is collapsed.
SET(GSMPI_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/build
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
......
# Use NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS to add additional search directories.
SET(NIST_SPARSE_BLAS_SEARCH_PATHS
${NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ThirdParty/spblastk0.9b/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/spblastk0.9b/lib
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(NIST_SPARSE_BLAS NAMES sbtk PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
FIND_LIBRARY(NIST_SPARSE_BLAS_DEBUG NAMES sbtk-g PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
GET_FILENAME_COMPONENT(NIST_SPARSE_BLAS_LIB_PATH ${NIST_SPARSE_BLAS} PATH CACHE)
SET(NIST_SPARSE_BLAS_INCLUDE_DIR ${NIST_SPARSE_BLAS_LIB_PATH}/../include CACHE FILEPATH "Sparse matrix solve include directory.")
MARK_AS_ADVANCED(NIST_SPARSE_BLAS)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_DEBUG)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_INCLUDE_DIR)
MARK_AS_ADVANCED(NIST_SPARSE_BLAS_LIB_PATH)
IF (NIST_SPARSE_BLAS)
SET(NIST_SPARSE_BLAS_FOUND ON)
ENDIF (NIST_SPARSE_BLAS)
IF (NIST_SPARSE_BLAS_FOUND)
IF (NOT NIST_SPARSE_BLAS_FIND_QUIETLY)
MESSAGE(STATUS "Found NIST Sparse Blas")
ENDIF (NOT NIST_SPARSE_BLAS_FIND_QUIETLY)
ELSE(NIST_SPARSE_BLAS_FOUND)
IF (NIST_SPARSE_BLAS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find NIST sparse blas library.")
ENDIF (NIST_SPARSE_BLAS_FIND_REQUIRED)
ENDIF (NIST_SPARSE_BLAS_FOUND)
SET(XXT_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.1.1/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.1.1/build
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/ThirdParty/gsmpi-1.2/build/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/gsmpi-1.2/build
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
......
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_git_head_revision _refspecvar _hashvar)
set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
# We have reached the root directory, we are not in git
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
return()
endif()
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
endwhile()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()
function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()
#message(STATUS "Arguments to execute_process: ${ARGN}")
execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
set(HEAD_HASH "${HEAD_REF}")
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
......@@ -51,13 +51,6 @@ INCLUDE(${NEKTAR++_ROOT_DIR}/FindLoki.cmake)
SET(TINYXML_ADDITIONAL_INCLUDE_DIRS "@TINYXML_BASE@")
INCLUDE(${NEKTAR++_ROOT_DIR}/FindTinyXml.cmake)
SET(NIST_SPARSE_BLAS_ADDITIONAL_INCLUDE_DIRS "@NIST_SPARSE_BLAS_INCLUDE_DIR@")
SET(NIST_SPARSE_BLAS "@NIST_SPARSE_BLAS@")
SET(NIST_SPARSE_BLAS_DEBUG "@NIST_SPARSE_BLAS_DEBUG@")
SET(NIST_SPARSE_BLAS_INCLUDE_DIR "@NIST_SPARSE_BLAS_INCLUDE_DIR@")
SET(NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT "@NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT@")
MARK_AS_ADVANCED(NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT)
SET(NEKTAR_USE_ACML "@NEKTAR_USE_ACML@")
SET(ACML_USE_SHARED_LIBRARIES "@ACML_USE_SHARED_LIBRARIES@")
SET(ACML_USE_OPENMP_LIBRARIES "@ACML_USE_OPENMP_LIBRARIES@")
......@@ -163,7 +156,7 @@ IF(NEKTAR_USE_ARPACK)
ENDIF(NEKTAR_USE_ARPACK)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LOKI_INCLUDE_DIR} ${TINYXML_BASE} ${NIST_SPARSE_BLAS_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LOKI_INCLUDE_DIR} ${TINYXML_BASE} )
SET(NEKTAR_PACKAGE_GENERATOR "@NEKTAR_PACKAGE_GENERATOR@")
SET(NEKTAR_USING_BLAS "@NEKTAR_USING_BLAS@")
......
......@@ -47,10 +47,6 @@ MACRO(SET_LAPACK_LINK_LIBRARIES name)
ENDIF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT AND NIST_SPARSE_BLAS_FOUND )
TARGET_LINK_LIBRARIES(${name} ${NIST_SPARSE_BLAS} )
ENDIF( NEKTAR_USE_NIST_SPARSE_BLAS_TOOLKIT AND NIST_SPARSE_BLAS_FOUND )
IF( NEKTAR_USE_METIS )
TARGET_LINK_LIBRARIES(${name} optimized ${METIS_LIB} debug
${METIS_LIB} )
......@@ -118,9 +114,14 @@ MACRO(SET_COMMON_PROPERTIES name)
"${CMAKE_CXX_FLAGS_DEBUG} -fpermissive")
ENDIF()
ENDIF( NOT MSVC)
# Define version
SET_PROPERTY(TARGET ${name}
APPEND PROPERTY COMPILE_DEFINITIONS
NEKTAR_VERSION=\"${NEKTAR_VERSION}\")
SET(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")
"${CMAKE_CXX_FLAGS_RELEASE} -DNEKTAR_RELEASE")
ENDIF(NOT ${CMAKE_CXX_FLAGS_DEBUG} MATCHES ".*DNEKTAR_DEBUG.*")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
......@@ -225,10 +226,8 @@ ENDMACRO(ADD_NEKTAR_EXECUTABLE name component sources)
MACRO(ADD_NEKTAR_LIBRARY name component type)
ADD_LIBRARY(${name} ${type} ${ARGN})
# NIST Sparse BLAS only static, so link into Nektar libraries directly.
TARGET_LINK_LIBRARIES( ${name} ${NIST_SPARSE_BLAS} ${METIS_LIB})
ADD_DEPENDENCIES(${name} spblastk0.9b modmetis-5.1.0 boost tinyxml
zlib-1.2.7)
TARGET_LINK_LIBRARIES( ${name} ${METIS_LIB} )
ADD_DEPENDENCIES(${name} modmetis-5.1.0 boost tinyxml zlib-1.2.7)
SET_PROPERTY(TARGET ${name} PROPERTY FOLDER ${component})
IF (NEKTAR_USE_MPI)
TARGET_LINK_LIBRARIES( ${name} ${GSMPI_LIBRARY} ${XXT_LIBRARY})
......@@ -264,3 +263,11 @@ MACRO(ADD_NEKTAR_TEST name)
ADD_TEST(NAME ${dir}_${name}
COMMAND Tester ${CMAKE_CURRENT_SOURCE_DIR}/Tests/${name}.tst)
ENDMACRO(ADD_NEKTAR_TEST)
MACRO(ADD_NEKTAR_TEST_LENGTHY name)
IF (NEKTAR_TEST_ALL)
GET_FILENAME_COMPONENT(dir ${CMAKE_CURRENT_SOURCE_DIR} NAME)
ADD_TEST(NAME ${dir}_${name}
COMMAND Tester ${CMAKE_CURRENT_SOURCE_DIR}/Tests/${name}.tst)
ENDIF(NEKTAR_TEST_ALL)
ENDMACRO(ADD_NEKTAR_TEST_LENGTHY)
......@@ -29,10 +29,10 @@ IF( NEKTAR_USE_MPI )
IF (THIRDPARTY_BUILD_GSMPI)
EXTERNALPROJECT_ADD(
gsmpi-1.1.1
gsmpi-1.2
PREFIX ${TPSRC}
URL ${TPURL}/gsmpi-1.1.1.tar.bz2
URL_MD5 48a6006437e094f6cccce65dcf79f967
URL ${TPURL}/gsmpi-1.2.tar.bz2
URL_MD5 35901be16791bfdeafa9c4d0e06d189b
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND
${CMAKE_COMMAND}
......@@ -40,7 +40,7 @@ IF( NEKTAR_USE_MPI )
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
${TPSRC}/src/gsmpi-1.1.1
${TPSRC}/src/gsmpi-1.2
)
SET(GSMPI_LIBRARY gsmpi CACHE FILEPATH
"GSMPI path" FORCE)
......
......@@ -6,8 +6,8 @@ IF (THIRDPARTY_BUILD_METIS)
EXTERNALPROJECT_ADD(
modmetis-5.1.0
PREFIX ${TPSRC}
URL ${TPURL}/modmetis-5.1.0.tar.bz2
URL_MD5 "8f8313a768e4611d1748d10f88f3d702"