Commit adfc640c authored by Chris Cantwell's avatar Chris Cantwell

Generalised library variables for OS type for ExternalProjects.

Fixed Boost build on Mac.


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@3781 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 5f5f4b9e
......@@ -213,7 +213,7 @@ MACRO(ADD_NEKTAR_LIBRARY name component type)
# NIST Sparse BLAS only static, so link into Nektar libraries directly.
TARGET_LINK_LIBRARIES( ${name} ${NIST_SPARSE_BLAS} ${METIS_LIB})
ADD_DEPENDENCIES(${name} sbtk modmetis)
ADD_DEPENDENCIES(${name} sbtk modmetis boost tinyxml zlib)
IF (NEKTAR_USE_MPI)
TARGET_LINK_LIBRARIES( ${name} ${GSMPI_LIBRARY} )
......
......@@ -24,8 +24,13 @@ IF (THIRDPARTY_BUILD_BOOST)
CONFIGURE_COMMAND ./configure --shared --prefix=${TPSRC}/dist
BUILD_IN_SOURCE 1
)
# Build Boost
IF (APPLE)
SET(TOOLSET darwin)
ELSE(APPLE)
SET(TOOLSET gcc)
ENDIF(APPLE)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
......@@ -34,37 +39,35 @@ IF (THIRDPARTY_BUILD_BOOST)
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ./bootstrap.sh --prefix=${TPSRC}/dist
BUILD_COMMAND ./b2 link=shared ${BOOST_FLAGS} ${BOOST_LIB_LIST}
--layout=system toolset=gcc install
--layout=system toolset=${TOOLSET} install
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
)
# Set up CMake variables
SET(Boost_DATE_TIME_LIBRARY
${TPSRC}/dist/lib/libboost_date_time.so)
SET(Boost_FILESYSTEM_LIBRARY
${TPSRC}/dist/lib/libboost_filesystem.so)
SET(Boost_IOSTREAMS_LIBRARY
${TPSRC}/dist/lib/libboost_iostreams.so)
SET(Boost_IOSTREAMS_LIBRARY_DEBUG
${TPSRC}/dist/lib/libboost_iostreams.so)
SET(Boost_IOSTREAMS_LIBRARY_RELEASE
${TPSRC}/dist/lib/libboost_iostreams.so)
SET(Boost_PROGRAM_OPTIONS_LIBRARY
${TPSRC}/dist/lib/libboost_program_options.so)
SET(Boost_SYSTEM_LIBRARY
${TPSRC}/dist/lib/libboost_system.so)
SET(Boost_THREAD_LIBRARY
${TPSRC}/dist/lib/libboost_thread.so)
SET(Boost_THREAD_LIBRARY_DEBUG
${TPSRC}/dist/lib/libboost_thread.so)
SET(Boost_THREAD_LIBRARY_RELEASE
${TPSRC}/dist/lib/libboost_thread.so)
SET(Boost_ZLIB_LIBRARY_DEBUG
${TPSRC}/dist/lib/libz.so)
SET(Boost_ZLIB_LIBRARY_RELEASE
${TPSRC}/dist/lib/libz.so)
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_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_ZLIB_LIBRARY z)
SET(Boost_ZLIB_LIBRARY_DEBUG z)
SET(Boost_ZLIB_LIBRARY_RELEASE z)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include/boost-1_49)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE ()
EXTERNALPROJECT_ADD(
boost
......
......@@ -16,7 +16,7 @@ IF( NEKTAR_USE_FFTW )
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${TPSRC}/src/fftw-3.2.2/configure --prefix=${TPSRC}/dist --quiet --enable-shared --disable-dependency-tracking
)
SET(FFTW_LIB ${TPSRC}/dist/lib/libfftw3.so)
SET(FFTW_LIB fftw3)
INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
ELSE ()
INCLUDE (FindFFTW)
......
......@@ -23,7 +23,7 @@ IF( NEKTAR_USE_MPI )
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
${TPSRC}/src/gsmpi-1.0
)
SET(GSMPI_LIBRARY ${TPSRC}/dist/lib/libgsmpi.a CACHE FILEPATH
SET(GSMPI_LIBRARY gsmpi CACHE FILEPATH
"GSMPI path" FORCE)
ELSE (THIRDPARTY_BUILD_GSMPI)
INCLUDE (FindGSMPI)
......
......@@ -11,8 +11,9 @@ IF (THIRDPARTY_BUILD_METIS)
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/modmetis-4.0
)
SET(METIS_LIB ${TPSRC}/dist/lib/libmodmetis.a CACHE FILEPATH
SET(METIS_LIB modmetis CACHE FILEPATH
"METIS library" FORCE)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE (THIRDPARTY_BUILD_METIS)
INCLUDE (FindMetis)
ENDIF (THIRDPARTY_BUILD_METIS)
......
......@@ -11,8 +11,9 @@ IF (THIRDPARTY_BUILD_NIST_SPBLASTK)
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/spblastk0.9b
)
SET(NIST_SPARSE_BLAS ${TPSRC}/dist/lib/libsbtk.a CACHE FILEPATH
SET(NIST_SPARSE_BLAS sbtk CACHE FILEPATH
"Path to NIST Sparse BLAS." FORCE)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE (THIRDPARTY_BUILD_NIST_SPBLASTK)
INCLUDE(FindNistSparseBlas)
ENDIF (THIRDPARTY_BUILD_NIST_SPBLASTK)
......
......@@ -5,6 +5,7 @@ MACRO(ADD_REGRESSION_EXECUTABLE name source)
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)
ADD_DEPENDENCIES(${name} boost)
IF( ${CMAKE_SYSTEM} MATCHES "Linux.*")
TARGET_LINK_LIBRARIES(${name} optimized rt debug rt)
......
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