Commit 1b1e5b99 authored by David Moxey's avatar David Moxey
Browse files

Fix post-merge issues

parents 1bc10e0e 8307c7d5
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build,
options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
RelWithDebInfo MinSizeRel.")
......@@ -45,6 +45,7 @@ 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_LIBRARY_TYPE "SHARED")
# Set up RPATH
......@@ -163,6 +164,7 @@ ENDIF ()
INCLUDE (ThirdPartyTinyxml)
INCLUDE (ThirdPartyLoki)
INCLUDE (ThirdPartyMetis)
INCLUDE (ThirdPartyScotch)
INCLUDE (ThirdPartyBoost)
INCLUDE (ThirdPartyZlib)
INCLUDE (ThirdPartyFFTW)
......@@ -173,6 +175,8 @@ INCLUDE (ThirdPartyVTK)
INCLUDE (ThirdPartyQT4)
INCLUDE (ThirdPartySMV)
INCLUDE (Doxygen)
IF( NEKTAR_USE_MKL )
INCLUDE (FindMKL)
SET(NEKTAR_USING_BLAS TRUE)
......@@ -267,10 +271,13 @@ IF (NEKTAR_BUILD_LIBRARY)
MultiRegions)
INCLUDE_DIRECTORIES(library)
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR})
ENDIF (NEKTAR_BUILD_LIBRARY)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
IF (NEKTAR_BUILD_SOLVERS)
INCLUDE_DIRECTORIES(solvers)
ADD_SUBDIRECTORY(solvers)
ENDIF(NEKTAR_BUILD_SOLVERS)
IF (NEKTAR_BUILD_UTILITIES)
INCLUDE_DIRECTORIES(utilities)
......@@ -295,6 +302,7 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.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
......@@ -303,8 +311,6 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
${CMAKE_SOURCE_DIR}/cmake/FindSMV.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR})
SET(NEKTAR_PASSED_FIRST_CONFIGURE ON CACHE BOOL INTERNAL)
MARK_AS_ADVANCED(NEKTAR_PASSED_FIRST_CONFIGURE)
......
# Doxygen support
# adapted from http://www.bluequartz.net/projects/EIM_Segmentation/ SoftwareDocumentation/html/usewithcmakeproject.html
OPTION(NEKTAR_BUILD_DOC "Build source code documentation using doxygen" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_BUILD_DOC_QHP
"Use Doxygen to create documentation for Qt Creator" OFF
"NEKTAR_BUILD_DOC" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_BUILD_DOC_XCODE
"Use Doxygen to create documentation for Apple Xcode" OFF
"NEKTAR_BUILD_DOC" OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_BUILD_DOC_ECLIPSE
"Use Doxygen to create documentation for Eclipse" OFF
"NEKTAR_BUILD_DOC" OFF)
IF (NEKTAR_BUILD_DOC)
FIND_PACKAGE(Doxygen)
IF(NOT DOXYGEN_FOUND)
MESSAGE(WARNING
"Doxygen not found. Building the documentation will fail.")
ENDIF()
IF(NEKTAR_BUILD_DOC_QHP)
SET(DOXYGEN_GENERATE_QHP "YES")
ENDIF()
IF(NEKTAR_BUILD_DOC_XCODE)
SET(DOXYGEN_GENERATE_DOCSET "YES")
ENDIF()
IF(NEKTAR_BUILD_DOC_ECLIPSE)
SET(DOXYGEN_GENERATE_ECLIPSEHELP "YES")
ENDIF()
INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doxygen/
DESTINATION ${NEKTAR_DOC_DIR})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
ADD_CUSTOM_TARGET(doc ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
ENDIF (NEKTAR_BUILD_DOC)
......@@ -20,7 +20,7 @@ ENDIF (METIS_LIB)
IF (METIS_FOUND)
IF (NOT METIS_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found Metis")
MESSAGE(STATUS "Found Metis: ${METIS_LIB}")
ENDIF (NOT METIS_LIB_FIND_QUIETLY)
ELSE(METIS_FOUND)
IF (METIS_LIB_FIND_REQUIRED)
......
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)
......@@ -4,60 +4,7 @@ MACRO(CHANGE_EXTENSION output var new_ext)
SET(${output} ${Path}/${FileName}.${new_ext})
ENDMACRO()
MACRO(SET_LAPACK_LINK_LIBRARIES name)
# Link FFTW before MKL to ensure FFTW original implementation used.
IF( NEKTAR_USE_FFTW )
TARGET_LINK_LIBRARIES(${name} optimized ${FFTW_LIB} debug ${FFTW_LIB})
ENDIF( NEKTAR_USE_FFTW )
IF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_MKL AND MKL_FOUND )
TARGET_LINK_LIBRARIES(${name} ${MKL} )
ENDIF( NEKTAR_USE_MKL AND MKL_FOUND )
IF( NEKTAR_USE_ACML AND ACML_FOUND )
TARGET_LINK_LIBRARIES(${name} ${ACML_TARGET_LINK_LIBRARIES} )
ENDIF( NEKTAR_USE_ACML AND ACML_FOUND )
IF( NEKTAR_USE_ACCELERATE_FRAMEWORK )
TARGET_LINK_LIBRARIES(${name} ${ACCELERATE_FRAMEWORK_LINK_FLAGS})
ENDIF ( NEKTAR_USE_ACCELERATE_FRAMEWORK )
IF( NEKTAR_USE_CHUD_FRAMEWORK )
TARGET_LINK_LIBRARIES(${name} ${CHUD_FRAMEWORK_LINK_FLAGS})
ENDIF ( NEKTAR_USE_CHUD_FRAMEWORK )
IF( NEKTAR_USE_WIN32_LAPACK )
TARGET_LINK_LIBRARIES(${name} ${WIN32_LAPACK} ${WIN32_BLAS})
INSTALL(FILES ${WIN32_LAPACK_DLL} ${WIN32_BLAS_DLL}
DESTINATION ${NEKTAR_BIN_DIR})
ENDIF( NEKTAR_USE_WIN32_LAPACK )
IF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
TARGET_LINK_LIBRARIES(${name} ${NATIVE_LAPACK} ${OPENBLAS})
ENDIF( NEKTAR_USE_OPENBLAS AND OPENBLAS_FOUND )
IF( NEKTAR_USE_SMV AND SMV_FOUND )
TARGET_LINK_LIBRARIES(${name} ${SMV_LIBRARY})
ENDIF( NEKTAR_USE_SMV AND SMV_FOUND )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
TARGET_LINK_LIBRARIES(${name} ${NATIVE_LAPACK} ${NATIVE_BLAS})
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
ENDIF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_METIS )
TARGET_LINK_LIBRARIES(${name} optimized ${METIS_LIB} debug
${METIS_LIB} )
ENDIF( NEKTAR_USE_METIS )
IF( NEKTAR_USE_ARPACK )
TARGET_LINK_LIBRARIES(${name} optimized ${ARPACK_LIB} debug
${ARPACK_LIB} )
ENDIF( NEKTAR_USE_ARPACK )
ENDMACRO(SET_LAPACK_LINK_LIBRARIES name)
MACRO(SET_COMMON_PROPERTIES name)
SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${NEKTAR_VERSION})
......@@ -157,42 +104,7 @@ MACRO(ADD_NEKTAR_EXECUTABLE name component sources)
SET_COMMON_PROPERTIES(${name})
IF( NEKTAR_USE_MKL AND MKL_FOUND )
TARGET_LINK_LIBRARIES(${name} ${MKL} )
SET_TARGET_PROPERTIES(${name}
PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} -DMKL_ILP64")
ENDIF( NEKTAR_USE_MKL AND MKL_FOUND )
IF( NEKTAR_USE_PETSC )
TARGET_LINK_LIBRARIES(${name} ${PETSC_LIBRARIES} )
ENDIF( NEKTAR_USE_PETSC )
TARGET_LINK_LIBRARIES(${name}
optimized LibUtilities debug LibUtilities-g
${Boost_THREAD_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${ZLIB_LIBRARY}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
)
ADD_DEPENDENCIES(${name} boost tinyxml zlib-1.2.7)
IF( NEKTAR_USE_MPI )
IF (NOT MPI_BUILTIN)
TARGET_LINK_LIBRARIES(${name} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
SET_TARGET_PROPERTIES(${name}
PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} ${MPI_LINK_FLAGS}")
SET_TARGET_PROPERTIES(${name}
PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}")
ENDIF()
ENDIF( NEKTAR_USE_MPI )
IF( ${CMAKE_SYSTEM} MATCHES "Linux.*" )
TARGET_LINK_LIBRARIES(${name} optimized rt debug rt)
# The boost thread library needs pthread on linux.
GET_TARGET_PROPERTY(THE_COMPILE_FLAGS ${name} COMPILE_FLAGS)
GET_TARGET_PROPERTY(THE_LINK_FLAGS ${name} LINK_FLAGS)
......@@ -229,12 +141,7 @@ ENDMACRO(ADD_NEKTAR_EXECUTABLE name component sources)
MACRO(ADD_NEKTAR_LIBRARY name component type)
ADD_LIBRARY(${name} ${type} ${ARGN})
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})
ENDIF (NEKTAR_USE_MPI)
SET_COMMON_PROPERTIES(${name})
......
......@@ -26,8 +26,8 @@ IF (THIRDPARTY_BUILD_BOOST)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_49_0.tar.bz2
URL_MD5 "0d202cb811f934282dea64856a175698"
URL ${TPURL}/boost_1_55_0.tar.bz2
URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ./bootstrap.sh --prefix=${TPSRC}/dist
BUILD_COMMAND NO_BZIP2=1 ./b2
......@@ -83,8 +83,8 @@ IF (THIRDPARTY_BUILD_BOOST)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_49_0.tar.bz2
URL_MD5 "0d202cb811f934282dea64856a175698"
URL ${TPURL}/boost_1_55_0.tar.bz2
URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND bootstrap.bat --prefix=${TPSRC}/boost
BUILD_COMMAND b2 --layout=system install
......@@ -93,6 +93,7 @@ IF (THIRDPARTY_BUILD_BOOST)
)
ENDIF ()
ELSE (THIRDPARTY_BUILD_BOOST)
ADD_CUSTOM_TARGET(boost ALL)
SET(Boost_DEBUG 0)
SET(Boost_NO_BOOST_CMAKE ON)
#If the user has not set BOOST_ROOT, look in a couple common places first.
......
OPTION(NEKTAR_USE_SCOTCH
"Use Scotch library for performing mesh partitioning." OFF)
CMAKE_DEPENDENT_OPTION(THIRDPARTY_BUILD_SCOTCH
"Build Scotch library from ThirdParty" OFF
"NEKTAR_USE_SCOTCH" OFF)
IF( NEKTAR_USE_SCOTCH )
IF (THIRDPARTY_BUILD_SCOTCH)
UNSET(FLEX CACHE)
FIND_PROGRAM(FLEX flex)
IF(NOT FLEX)
MESSAGE(FATAL_ERROR
"'flex' lexical parser not found. Cannot build scotch.")
ENDIF(NOT FLEX)
SET(SCOTCH_SRC ${TPSRC}/src/scotch-6.0.0/src)
IF (APPLE)
SET(SCOTCH_MAKE Makefile.inc.i686_mac_darwin8)
SET(SCOTCH_LDFLAGS "")
SET(SCOTCH_CFLAGS "-O3 -Drestrict=__restrict -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DCOMMON_PTHREAD_BARRIER")
ELSE ()
IF (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
SET(SCOTCH_MAKE Makefile.inc.x86-64_pc_linux2)
SET(SCOTCH_CFLAGS "-O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64")
ELSE ()
SET(SCOTCH_MAKE Makefile.inc.i686_pc_linux2)
SET(SCOTCH_CFLAGS "-O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict")
ENDIF ()
SET(SCOTCH_LDFLAGS "-lz -lm -lrt -lpthread")
ENDIF ()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
scotch-6.0.0
PREFIX ${TPSRC}
URL ${TPURL}/scotch_6.0.0.tar.gz
URL_MD5 "ba117428c0a6cd97d0c93e8b872bb3fe"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND rm -f ${SCOTCH_SRC}/Makefile.inc
COMMAND ln -s
${SCOTCH_SRC}/Make.inc/${SCOTCH_MAKE}
${SCOTCH_SRC}/Makefile.inc
BUILD_COMMAND $(MAKE) -C ${TPSRC}/src/scotch-6.0.0/src
"CFLAGS=${SCOTCH_CFLAGS}"
"LDFLAGS=${SCOTCH_LDFLAGS}"
"CLIBFLAGS=-fPIC" scotch
INSTALL_COMMAND $(MAKE) -C ${TPSRC}/src/scotch-6.0.0/src
prefix=${TPSRC}/dist install
)
SET(SCOTCH_LIB scotch CACHE FILEPATH
"Scotch library" FORCE)
SET(SCOTCHERR_LIB scotcherr CACHE FILEPATH
"Scotch error library" FORCE)
SET(SCOTCHMETIS_LIB scotchmetis CACHE FILEPATH
"Scotch Metis interface library" FORCE)
MARK_AS_ADVANCED(SCOTCH_LIB)
MARK_AS_ADVANCED(SCOTCHERR_LIB)
MARK_AS_ADVANCED(SCOTCHMETIS_LIB)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
MESSAGE(STATUS "Build Scotch: ${TPSRC}/dist/lib/lib${SCOTCH_LIB}.a")
ELSE (THIRDPARTY_BUILD_SCOTCH)
INCLUDE (FindScotch)
ENDIF (THIRDPARTY_BUILD_SCOTCH)
ENDIF( NEKTAR_USE_SCOTCH )
......@@ -6,34 +6,29 @@ OPTION(THIRDPARTY_BUILD_TINYXML
"Build TinyXML library from ThirdParty." ON)
IF (THIRDPARTY_BUILD_TINYXML)
#SET(TINYXML_DIR ${TPSRC}/tinyxml)
#EXTERNALPROJECT_ADD(
# tinyxml
# PREFIX ${TPSRC}/build
# URL ${TPSRC}/tinyxml.tar.bz2
# URL_MD5 "aec842139928e65aa7abdff6de0a09ec"
# CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX: PATH=${TPSRC}/ #build/dist ${TPSRC}/build/src/tinyxml
#)
#SET(TINYXML_LIB ${TPSRC}/build/dist/lib/libtinyxml.so)
#SET(TINYXML_BASE ${TPSRC}/build/src)
# Tiny XML
IF (NOT EXISTS ${TPSRC}/tinyxml_2_4_3.tar.bz2)
FILE(DOWNLOAD ${TPURL}/tinyxml_2_4_3.tar.bz2
${TPSRC}/tinyxml_2_4_3.tar.bz2)
ENDIF()
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${TPSRC}/tinyxml_2_4_3.tar.bz2
WORKING_DIRECTORY ${TPSRC}
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
tinyxml-2.4.3
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_4_3-1.tar.bz2
URL_MD5 "a00f5e3b547b803977c5744547a688f7"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/src/tinyxml-2.4.3
)
SET(TINYXML_INCLUDE_DIR ${TPSRC}/tinyxml)
SET(TINYXML_BASE ${TPSRC})
SET(TINYXML_SRC_DIR ${TPSRC}/tinyxml)
SET(TINYXML_LIB tinyxml CACHE FILEPATH
"Tinyxml library" FORCE)
MARK_AS_ADVANCED(TINYXML_LIB)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
ELSE (THIRDPARTY_BUILD_TINYXML)
INCLUDE (FindTinyXml)
ENDIF (THIRDPARTY_BUILD_TINYXML)
SET(TINYXML_LIB tinyxml)
INCLUDE_DIRECTORIES(SYSTEM ${TINYXML_BASE})
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment