Commit 3f566626 authored by Dave Moxey's avatar Dave Moxey

Revert CMake changes for another branch

parent 43223556
MACRO(THIRDPARTY_SHARED_LIBNAME name)
SET(${name} "${TPDIST}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${${name}}${CMAKE_SHARED_LIBRARY_SUFFIX}")
ENDMACRO()
MACRO(THIRDPARTY_STATIC_LIBNAME name)
SET(${name} "${TPDIST}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${${name}}${CMAKE_STATIC_LIBRARY_SUFFIX}")
ENDMACRO()
MACRO(CHANGE_EXTENSION output var new_ext)
GET_FILENAME_COMPONENT(FileName ${var} NAME_WE)
GET_FILENAME_COMPONENT(Path ${var} PATH)
......
......@@ -65,9 +65,9 @@ IF (THIRDPARTY_BUILD_BOOST)
INCLUDE(ExternalProject)
# Only build the libraries we need
FOREACH(boostlib ${NEEDED_BOOST_LIBS})
LIST(APPEND BOOST_LIB_LIST --with-${boostlib})
ENDFOREACH()
SET(BOOST_LIB_LIST --with-system --with-iostreams --with-filesystem
--with-program_options --with-date_time --with-thread
--with-regex --with-timer)
IF (NOT WIN32)
# We need -fPIC for 64-bit builds
......@@ -87,9 +87,9 @@ IF (THIRDPARTY_BUILD_BOOST)
ELSEIF (MSVC12)
SET(TOOLSET msvc-12.0)
ENDIF()
ELSE()
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF()
ENDIF(APPLE)
IF (NOT WIN32)
EXTERNALPROJECT_ADD(
......@@ -160,24 +160,36 @@ IF (THIRDPARTY_BUILD_BOOST)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
FOREACH(BOOSTLIB ${NEEDED_BOOST_LIBS})
STRING(TOUPPER ${BOOSTLIB} BOOSTLIB_UPPER)
SET(Boost_${BOOSTLIB_UPPER}_LIBRARY boost_${BOOSTLIB})
SET(Boost_${BOOSTLIB_UPPER}_LIBRARY_DEBUG boost_${BOOSTLIB})
SET(Boost_${BOOSTLIB_UPPER}_LIBRARY_RELEASE boost_${BOOSTLIB})
THIRDPARTY_SHARED_LIBNAME(Boost_${BOOSTLIB_UPPER}_LIBRARY)
THIRDPARTY_SHARED_LIBNAME(Boost_${BOOSTLIB_UPPER}_LIBRARY_DEBUG)
THIRDPARTY_SHARED_LIBNAME(Boost_${BOOSTLIB_UPPER}_LIBRARY_RELEASE)
ENDFOREACH()
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_TIMER_LIBRARY boost_timer)
SET(Boost_TIMER_LIBRARY_DEBUG boost_timer)
SET(Boost_TIMER_LIBRARY_RELEASE boost_timer)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include)
SET(Boost_CONFIG_INCLUDE_DIR ${TPINC})
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
SET(Boost_CONFIG_LIBRARY_DIR ${TPLIB})
STRING(REPLACE ";" " boost_" Boost_LIBRARIES "${NEEDED_BOOST_LIBS}")
SET(Boost_LIBRARIES "boost_${Boost_LIBRARIES}")
SET(Boost_LIBRARIES boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_system boost_thread boost_timer)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
STRING(REPLACE ";" ", " NEEDED_BOOST_LIBS_STRING "${NEEDED_BOOST_LIBS}")
......
......@@ -46,10 +46,9 @@ IF (NEKTAR_USE_FFTW)
SET(FFTW_INCLUDE_DIR ${TPDIST}/include CACHE FILEPATH
"FFTW include" FORCE)
THIRDPARTY_SHARED_LIBNAME(FFTW_LIBRARY)
LINK_DIRECTORIES(${TPDIST}/lib)
MESSAGE(STATUS "Build FFTW: ${FFTW_LIBRARY}")
MESSAGE(STATUS "Build FFTW: ${TPDIST}/lib/lib${FFTW_LIBRARY}.so")
SET(FFTW_CONFIG_INCLUDE_DIR ${TPINC})
ELSE ()
ADD_CUSTOM_TARGET(fftw-3.2.2 ALL)
......
......@@ -64,7 +64,6 @@ IF (NEKTAR_USE_HDF5)
"HDF5 libraries" FORCE)
SET(HDF5_INCLUDE_DIRS ${TPDIST}/include CACHE FILEPATH
"HDF5 include directory" FORCE)
THIRDPARTY_SHARED_LIBNAME(HDF5_LIBRARIES)
LINK_DIRECTORIES(${TPDIST}/lib)
......
......@@ -75,10 +75,8 @@ IF( NEKTAR_USE_MPI )
SET(XXT_LIBRARY xxt CACHE FILEPATH
"XXT path" FORCE)
MARK_AS_ADVANCED(XXT_LIBRARY)
THIRDPARTY_STATIC_LIBNAME(GSMPI_LIBRARY)
THIRDPARTY_STATIC_LIBNAME(XXT_LIBRARY)
MESSAGE(STATUS "Build GSMPI: ${GSMPI_LIBRARY}")
MESSAGE(STATUS "Build XXT: ${XXT_LIBRARY}")
MESSAGE(STATUS "Build GSMPI: ${TPDIST}/lib/lib${GSMPI_LIBRARY}.a")
MESSAGE(STATUS "Build XXT: ${TPDIST}/lib/lib${XXT_LIBRARY}.a")
ELSE (THIRDPARTY_BUILD_GSMPI)
ADD_CUSTOM_TARGET(gsmpi-1.2 ALL)
INCLUDE (FindGSMPI)
......
......@@ -41,9 +41,13 @@ IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
ENDIF()
SET(METIS_LIB metis CACHE FILEPATH "METIS library" FORCE)
THIRDPARTY_STATIC_LIBNAME(METIS_LIB)
MARK_AS_ADVANCED(METIS_LIB)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(${TPDIST}/include)
MESSAGE(STATUS "Build Metis: ${METIS_LIB}")
IF (WIN32)
MESSAGE(STATUS "Build Metis: ${TPDIST}/${LIB_DIR}/${METIS_LIB}.dll")
ELSE ()
MESSAGE(STATUS "Build Metis: ${TPDIST}/${LIB_DIR}/lib${METIS_LIB}.a")
ENDIF()
......@@ -70,9 +70,8 @@ IF (NEKTAR_USE_PETSC)
SET(PETSC_INCLUDES ${TPDIST}/include CACHE FILEPATH
"PETSc includes" FORCE)
THIRDPARTY_STATIC_LIBNAME(PETSC_LIBRARIES)
LINK_DIRECTORIES(${TPDIST}/lib)
MESSAGE(STATUS "Build PETSc: ${PETSC_LIBRARIES}")
MESSAGE(STATUS "Build PETSc: ${TPDIST}/${LIB_DIR}/lib${PETSC_LIBRARIES}.a")
SET(PETSC_CONFIG_INCLUDE_DIR ${TPINC})
ELSE (THIRDPARTY_BUILD_PETSC)
INCLUDE(FindPETSc)
......
......@@ -19,9 +19,8 @@ IF (THIRDPARTY_BUILD_SMV)
SET(SMV smv CACHE FILEPATH "Path to LibSMV." FORCE)
MARK_AS_ADVANCED(SMV)
THIRDPARTY_STATIC_LIBNAME(SMV)
LINK_DIRECTORIES(${TPDIST}/lib)
MESSAGE(STATUS "Build LibSMV: ${SMV}")
MESSAGE(STATUS "Build LibSMV: ${TPDIST}/lib/lib${SMV}.a")
SET(NEKTAR_USING_SMV TRUE)
ADD_DEFINITIONS(-DNEKTAR_USING_SMV)
ELSE (THIRDPARTY_BUILD_SMV)
......
......@@ -88,8 +88,7 @@ IF (NEKTAR_USE_SCOTCH)
LINK_DIRECTORIES(${TPDIST}/lib)
THIRDPARTY_STATIC_LIBNAME(SCOTCH_LIBRARY)
MESSAGE(STATUS "Build Scotch: ${SCOTCH_LIBRARY}")
MESSAGE(STATUS "Build Scotch: ${TPDIST}/lib/lib${SCOTCH_LIBRARY}.a")
SET(SCOTCH_CONFIG_INCLUDE_DIR ${TPINC})
ELSE (THIRDPARTY_BUILD_SCOTCH)
ADD_CUSTOM_TARGET(scotch-6.0.0 ALL)
......
......@@ -49,10 +49,16 @@ IF (THIRDPARTY_BUILD_TINYXML)
SET(TINYXML_INCLUDE_DIR ${TPDIST}/include CACHE FILEPATH
"TinyXML include" FORCE)
THIRDPARTY_STATIC_LIBNAME(TINYXML_LIBRARY)
LINK_DIRECTORIES(${TPDIST}/lib)
MESSAGE(STATUS "Build TinyXML: ${TINYXML_LIBRARY}")
IF (WIN32)
MESSAGE(STATUS
"Build TinyXML: ${TPDIST}/${LIB_DIR}/${TINYXML_LIBRARY}.dll")
ELSE ()
MESSAGE(STATUS
"Build TinyXML: ${TPDIST}/${LIB_DIR}/lib${TINYXML_LIBRARY}.a")
ENDIF ()
SET(TINYXML_CONFIG_INCLUDE_DIR ${TPINC})
ELSE()
ADD_CUSTOM_TARGET(tinyxml-2.6.2 ALL)
......
......@@ -68,10 +68,7 @@ IF (THIRDPARTY_BUILD_ZLIB)
"Zlib library" FORCE)
SET(ZLIB_LIBRARY_RELEASE zlib CACHE FILEPATH
"Zlib library" FORCE)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY_DEBUG)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY_RELEASE)
MESSAGE(STATUS "Build Zlib: ${ZLIB_LIBRARY}")
MESSAGE(STATUS "Build Zlib: ${TPDIST}/${LIB_DIR}/${ZLIB_LIBRARY}.dll")
ELSE ()
SET(ZLIB_LIBRARY z CACHE FILEPATH
"Zlib library" FORCE)
......@@ -79,10 +76,7 @@ IF (THIRDPARTY_BUILD_ZLIB)
"Zlib library" FORCE)
SET(ZLIB_LIBRARY_RELEASE z CACHE FILEPATH
"Zlib library" FORCE)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY_DEBUG)
THIRDPARTY_STATIC_LIBNAME(ZLIB_LIBRARY_RELEASE)
MESSAGE(STATUS "Build Zlib: ${ZLIB_LIBRARY}")
MESSAGE(STATUS "Build Zlib: ${TPDIST}/${LIB_DIR}/lib${ZLIB_LIBRARY}.a")
ENDIF ()
SET(ZLIB_INCLUDE_DIR ${TPDIST}/include CACHE PATH "Zlib include" FORCE)
......
......@@ -80,9 +80,9 @@ namespace LibUtilities
{
int CommDataTypeGetSize(CommDataType);
LIB_UTILITIES_EXPORT template <class T> class CommDataTypeTraits
template <class T> class CommDataTypeTraits
{
static CommDataType type;
LIB_UTILITIES_EXPORT static CommDataType type;
public:
static CommDataType &GetDataType()
......@@ -108,7 +108,7 @@ public:
/**
* Partial specialisation for vectors
*/
LIB_UTILITIES_EXPORT template <class elemT>
template <class elemT>
class CommDataTypeTraits<std::vector<elemT> >
{
public:
......@@ -134,7 +134,7 @@ public:
/**
* Partial specialisation for vectors
*/
LIB_UTILITIES_EXPORT template <class elemT>
template <class elemT>
class CommDataTypeTraits<Array<OneD, elemT> >
{
public:
......
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