Commit c397f8f3 authored by Dave Moxey's avatar Dave Moxey

Merge branch 'feature/upgrade-zlib' of localhost:nektar

parents 93956964 a1aeeddc
......@@ -167,10 +167,10 @@ MACRO(ADD_NEKTAR_EXECUTABLE name component sources)
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_ZLIB_LIBRARY}
${ZLIB_LIBRARY}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
)
ADD_DEPENDENCIES(${name} boost tinyxml zlib)
ADD_DEPENDENCIES(${name} boost tinyxml zlib-1.2.7)
IF( NEKTAR_USE_MPI )
TARGET_LINK_LIBRARIES(${name} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
......@@ -221,7 +221,8 @@ 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} spblastk0.9b modmetis-5.0.2 boost tinyxml zlib)
ADD_DEPENDENCIES(${name} spblastk0.9b modmetis-5.0.2 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})
......
......@@ -40,10 +40,10 @@ IF (THIRDPARTY_BUILD_BOOST)
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
)
# If building ThirdParty zlib, force zlib build before boost
IF (THIRDPARTY_BUILD_ZLIB)
ADD_DEPENDENCIES(boost zlib)
ADD_DEPENDENCIES(boost zlib-1.2.7)
ENDIF(THIRDPARTY_BUILD_ZLIB)
# Set up CMake variables
......@@ -95,15 +95,15 @@ ELSE (THIRDPARTY_BUILD_BOOST)
IF (DEFINED TEST_ENV)
SET(Boost_NO_SYSTEM_PATHS ON)
SET(BOOST_ROOT $ENV{BOOST_HOME})
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams zlib date_time
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time
filesystem system program_options regex )
ELSE ()
SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/boost)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/../ThirdParty/boost)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
SET(BOOST_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/dist)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
FIND_PACKAGE( Boost QUIET COMPONENTS thread iostreams date_time filesystem system program_options regex)
ENDIF()
ELSE()
FIND_PACKAGE( Boost COMPONENTS thread iostreams zlib date_time filesystem system program_options regex)
......@@ -129,9 +129,6 @@ ELSE (THIRDPARTY_BUILD_BOOST)
IF (Boost_REGEX_FOUND)
MESSAGE(STATUS "Found Boost regex library: ${Boost_REGEX_LIBRARY}")
ENDIF ()
IF (Boost_ZLIB_FOUND)
MESSAGE(STATUS "-- Found Boost zlib library: ${Boost_ZLIB_LIBRARY}")
ENDIF ()
ENDIF (THIRDPARTY_BUILD_BOOST)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" OFF)
########################################################################
#
# ThirdParty configuration for Nektar++
#
# ZLib
#
########################################################################
# Attempt to identify Macports libraries, if they exist. This prevents
# cmake warnings later on.
SET(ZLIB_ROOT /opt/local/)
# Find a system ZLIB library
# If not found enable the THIRDPARTY_BUILD_ZLIB option
FIND_PACKAGE( ZLIB )
IF (ZLIB_FOUND AND NOT ZLIB_VERSION_PATCH LESS 7 )
SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
SET(ZLIB_LIBRARY_DEBUG ${ZLIB_LIBRARIES})
SET(ZLIB_LIBRARY_RELEASE ${ZLIB_LIBRARIES})
MESSAGE(STATUS "Found Zlib library: ${ZLIB_LIBRARY}")
OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" OFF)
ELSE ()
OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" ON)
ENDIF()
# If we or the user
IF (THIRDPARTY_BUILD_ZLIB)
MESSAGE(STATUS "Will build Zlib 1.2.7")
# Build the Zlib library separately
EXTERNALPROJECT_ADD(
zlib
zlib-1.2.7
PREFIX ${TPSRC}
URL ${TPURL}/zlib-1.2.3.tar.bz2
URL_MD5 "dee233bf288ee795ac96a98cc2e369b6"
URL ${TPURL}/zlib-1.2.7.tar.gz
URL_MD5 "4a162e0f643232e7e278d59a0603ceb0"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ./configure --shared --prefix=${TPSRC}/dist
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist -DCMAKE_C_FLAGS:STRING=-fPIC ${TPSRC}/src/zlib-1.2.7
)
SET(Boost_ZLIB_LIBRARY z)
SET(Boost_ZLIB_LIBRARY_DEBUG z)
SET(Boost_ZLIB_LIBRARY_RELEASE z)
ELSE (THIRDPARTY_BUILD_ZLIB)
# Attempt to identify Macports libraries, if they exist. This prevents
# cmake warnings later on.
IF (APPLE)
FIND_LIBRARY(ZLIB_LIBRARY z PATHS /opt/local/lib NO_DEFAULT_PATH)
ENDIF()
# Find a system ZLIB library and use that instead
IF (ZLIB_LIBRARY-NOTFOUND OR NOT APPLE)
FIND_PACKAGE( ZLIB )
IF (ZLIB_FOUND)
SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
ENDIF()
ENDIF()
IF (ZLIB_LIBRARY)
SET(Boost_ZLIB_LIBRARY ${ZLIB_LIBRARY})
SET(Boost_ZLIB_LIBRARY_RELEASE ${ZLIB_LIBRARY})
SET(Boost_ZLIB_LIBRARY_DEBUG ${ZLIB_LIBRARY})
ENDIF()
IF (ZLIB_FOUND)
MESSAGE(STATUS "Found Zlib library: ${ZLIB_LIBRARY}")
ENDIF ()
IF (WIN32)
SET(ZLIB_LIBRARY zlib)
SET(ZLIB_LIBRARY_DEBUG zlib)
SET(ZLIB_LIBRARY_RELEASE zlib)
ELSE (WIN32)
SET(ZLIB_LIBRARY z)
SET(ZLIB_LIBRARY_DEBUG z)
SET(ZLIB_LIBRARY_RELEASE z)
ENDIF (WIN32)
ENDIF (THIRDPARTY_BUILD_ZLIB)
......@@ -5,7 +5,7 @@ SET(LinkLibraries
optimized LibUtilities debug LibUtilities-g
optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG}
optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG}
optimized ${Boost_ZLIB_LIBRARY_RELEASE} debug ${Boost_ZLIB_LIBRARY_DEBUG}
optimized ${ZLIB_LIBRARY_RELEASE} debug ${ZLIB_LIBRARY_DEBUG}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
)
......
......@@ -6,7 +6,7 @@ SET(LinkLibraries
optimized LibUtilities debug LibUtilities-g
optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG}
optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG}
optimized ${Boost_ZLIB_LIBRARY_RELEASE} debug ${Boost_ZLIB_LIBRARY_DEBUG}
optimized ${ZLIB_LIBRARY_RELEASE} debug ${ZLIB_LIBRARY_DEBUG}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
optimized sbtk debug sbtk
)
......
......@@ -6,7 +6,7 @@ SET(LinkLibraries
optimized LibUtilities debug LibUtilities-g
optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG}
optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG}
optimized ${Boost_ZLIB_LIBRARY_RELEASE} debug ${Boost_ZLIB_LIBRARY_DEBUG}
optimized ${ZLIB_LIBRARY_RELEASE} debug ${ZLIB_LIBRARY_DEBUG}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
optimized sbtk debug sbtk
)
......
......@@ -6,7 +6,7 @@ SET(LinkLibraries
optimized LibUtilities debug LibUtilities-g
optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG}
optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG}
optimized ${Boost_ZLIB_LIBRARY_RELEASE} debug ${Boost_ZLIB_LIBRARY_DEBUG}
optimized ${ZLIB_LIBRARY_RELEASE} debug ${ZLIB_LIBRARY_DEBUG}
optimized ${Boost_DATE_TIME_LIBRARY_RELEASE} debug ${Boost_DATE_TIME_LIBRARY_DEBUG}
optimized ${Boost_FILESYSTEM_LIBRARY_RELEASE} debug ${Boost_FILESYSTEM_LIBRARY_DEBUG}
optimized ${Boost_SYSTEM_LIBRARY_RELEASE} debug ${Boost_SYSTEM_LIBRARY_DEBUG}
......
......@@ -14,7 +14,7 @@ MACRO(ADD_SOLVER_EXECUTABLE name component source)
${NEKTAR++_LIBRARIES}
${Boost_THREAD_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
${Boost_ZLIB_LIBRARY}
${ZLIB_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
......
......@@ -6,7 +6,7 @@ SET(LinkLibraries
optimized LibUtilities debug LibUtilities-g
optimized ${Boost_THREAD_LIBRARY_RELEASE} debug ${Boost_THREAD_LIBRARY_DEBUG}
optimized ${Boost_IOSTREAMS_LIBRARY_RELEASE} debug ${Boost_IOSTREAMS_LIBRARY_DEBUG}
optimized ${Boost_ZLIB_LIBRARY_RELEASE} debug ${Boost_ZLIB_LIBRARY_DEBUG}
optimized ${ZLIB_LIBRARY_RELEASE} debug ${ZLIB_LIBRARY_DEBUG}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
optimized sbtk debug sbtk
)
......
......@@ -10,7 +10,7 @@ MACRO(ADD_UTILITIES_EXECUTABLE name component source)
${NEKTAR++_LIBRARIES}
${Boost_THREAD_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
${Boost_ZLIB_LIBRARY}
${ZLIB_LIBRARY}
${Boost_DATE_TIME_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
......
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