"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CMakeLists.txt" between
CGNS-4.1.2.tar.gz and CGNS-4.2.0.tar.gz

About: The CGNS (CFD General Notation System) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations.

CMakeLists.txt  (CGNS-4.1.2):CMakeLists.txt  (CGNS-4.2.0)
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 3.8)
if(COMMAND cmake_policy) if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy) endif(COMMAND cmake_policy)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.10")
cmake_policy(SET CMP0015 NEW)
endif()
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
cmake_policy(SET CMP0081 NEW)
endif()
set(CMAKE_BUILD_TYPE "Release" CACHE STRING set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"one of: Release, Debug, RelWithDebInfo or MinSizeRel") "one of: Release, Debug, RelWithDebInfo or MinSizeRel")
if (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release;Debug;RelWithDeb
Info;MinSizeRel")
endif (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
project("cgns" C) project("cgns" C)
set(CGNS_VERSION "4.1")
# Determine CGNS_VERSION from src/cgnslib.h for
file (READ ${PROJECT_SOURCE_DIR}/src/cgnslib.h _cgnslib_h_contents)
string (REGEX REPLACE ".*#define[ \t]+CGNS_DOTVERS[ \t]+([0-9]*)\\.([0-9])[0-9]*
.*$"
"\\1.\\2" CGNS_VERSION ${_cgnslib_h_contents})
# Allow for building a package # Allow for building a package
set(CPACK_PACKAGE_VERSION "${CGNS_VERSION}") set(CPACK_PACKAGE_VERSION "${CGNS_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "cgns-${CGNS_VERSION}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "cgns-${CGNS_VERSION}")
set(CPACK_GENERATOR "STGZ;TGZ;ZIP") set(CPACK_GENERATOR "STGZ;TGZ;ZIP")
set(CPACK_SOURCE_GENERATOR "STGZ;TGZ;ZIP") set(CPACK_SOURCE_GENERATOR "STGZ;TGZ;ZIP")
include(CPack) include(CPack)
CONFIGURE_FILE( CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
skipping to change at line 41 skipping to change at line 49
if (CYGWIN) if (CYGWIN)
set(WIN32 "NO") set(WIN32 "NO")
endif (CYGWIN) endif (CYGWIN)
############## ##############
# build mode # # build mode #
############## ##############
# get some type sizes # get some type sizes
include(CheckTypeSize) include(CheckTypeSize)
CHECK_TYPE_SIZE(long SIZE_OF_LONG) CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(off_t SIZE_OF_OFF_T) CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
if ("${SIZE_OF_OFF_T}" LESS 8) if ("${SIZEOF_OFF_T}" LESS 8)
option(CGNS_ENABLE_LFS "Enable or disable large file support" "OFF") option(CGNS_ENABLE_LFS "Enable or disable large file support" "OFF")
endif ("${SIZE_OF_OFF_T}" LESS 8) endif ("${SIZEOF_OFF_T}" LESS 8)
if ("${CMAKE_SIZEOF_VOID_P}" GREATER 4) if ("${CMAKE_SIZEOF_VOID_P}" GREATER 4)
option(CGNS_ENABLE_64BIT "Enable or disable 64-bit code building" "OFF") option(CGNS_ENABLE_64BIT "Enable or disable 64-bit code building" "ON")
else ("${CMAKE_SIZEOF_VOID_P}" GREATER 4) else ("${CMAKE_SIZEOF_VOID_P}" GREATER 4)
set(CGNS_ENABLE_64BIT "OFF") set(CGNS_ENABLE_64BIT "OFF")
endif ("${CMAKE_SIZEOF_VOID_P}" GREATER 4) endif ("${CMAKE_SIZEOF_VOID_P}" GREATER 4)
option(CGNS_ENABLE_LEGACY "Enable or disable building legacy code (3.0 compatibl e)" "OFF") option(CGNS_ENABLE_LEGACY "Enable or disable building legacy code (3.0 compatibl e)" "OFF")
option(CGNS_ENABLE_SCOPING "Enable or disable scoping of enumeration values" "OF F") option(CGNS_ENABLE_SCOPING "Enable or disable scoping of enumeration values" "OF F")
option(CGNS_ENABLE_BASE_SCOPE "Enable or disable base scoped families or connect ivities" "OFF") option(CGNS_ENABLE_BASE_SCOPE "Enable or disable base scoped families or connect ivities" "OFF")
option(CGNS_ENABLE_MEM_DEBUG "Enable or disable memory debugging" "OFF") option(CGNS_ENABLE_MEM_DEBUG "Enable or disable memory debugging" "OFF")
set(CGNS_BUILD_SHARED "ON" CACHE BOOL "Build a shared version of the library")
if (CGNS_ENABLE_LEGACY) if (CGNS_ENABLE_LEGACY)
set(CGNS_ENABLE_64BIT "OFF") set(CGNS_ENABLE_64BIT "OFF")
mark_as_advanced(FORCE CGNS_ENABLE_64BIT) mark_as_advanced(FORCE CGNS_ENABLE_64BIT)
else (CGNS_ENABLE_LEGACY) else (CGNS_ENABLE_LEGACY)
mark_as_advanced(CLEAR CGNS_ENABLE_64BIT) mark_as_advanced(CLEAR CGNS_ENABLE_64BIT)
endif (CGNS_ENABLE_LEGACY) endif (CGNS_ENABLE_LEGACY)
if (CGNS_ENABLE_64BIT) if (CGNS_ENABLE_64BIT)
set(CGNS_ENABLE_LEGACY "OFF") set(CGNS_ENABLE_LEGACY "OFF")
mark_as_advanced(FORCE CGNS_ENABLE_LEGACY) mark_as_advanced(FORCE CGNS_ENABLE_LEGACY)
skipping to change at line 110 skipping to change at line 120
########### ###########
# Allow fortran support to be toggled # Allow fortran support to be toggled
option(CGNS_ENABLE_FORTRAN "Enable or disable the use of Fortran" "OFF") option(CGNS_ENABLE_FORTRAN "Enable or disable the use of Fortran" "OFF")
if (NOT DEFINED FORTRAN_NAMING) if (NOT DEFINED FORTRAN_NAMING)
set(FORTRAN_NAMING "UNKNOWN") set(FORTRAN_NAMING "UNKNOWN")
endif (NOT DEFINED FORTRAN_NAMING) endif (NOT DEFINED FORTRAN_NAMING)
# If we are using fortran, enable it and configure the C-Fortran interface # If we are using fortran, enable it and configure the C-Fortran interface
# It would be nice to automatically detect this setting # It would be nice to automatically detect this setting
if(CGNS_ENABLE_FORTRAN) if(CGNS_ENABLE_FORTRAN)
enable_language("Fortran" OPTIONAL)
enable_language("Fortran" OPTIONAL) #-----------------------------------------------------------------------------
# Detect name mangling convention used between Fortran and C
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Detect name mangling convention used between Fortran and C
#-----------------------------------------------------------------------------
set(F2CLIST "LOWERCASE" "LOWERCASE_" "LOWERCASE__" "UPPERCASE" "UPPERCASE_" " UPPERCASE__") set(F2CLIST "LOWERCASE" "LOWERCASE_" "LOWERCASE__" "UPPERCASE" "UPPERCASE_" " UPPERCASE__")
set(FORTRAN_NAMING_HELP set(FORTRAN_NAMING_HELP
"Configures how to link the Fortran components into the C library. "Configures how to link the Fortran components into the C library.
Options are: Options are:
LOWERCASE LOWERCASE
LOWERCASE_ LOWERCASE_
LOWERCASE__ LOWERCASE__
UPPERCASE UPPERCASE
UPPERRCASE_ UPPERRCASE_
UPPERRCASE__ UPPERRCASE__
skipping to change at line 146 skipping to change at line 153
MACRO_NAMESPACE "CGNS_FC_" MACRO_NAMESPACE "CGNS_FC_"
SYMBOL_NAMESPACE "CGNS_FC_") SYMBOL_NAMESPACE "CGNS_FC_")
file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "CGNS_FC_GLOBAL\\( .*,.*\\) +(.*)") file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "CGNS_FC_GLOBAL\\( .*,.*\\) +(.*)")
string (REGEX MATCH "CGNS_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) string (REGEX MATCH "CGNS_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
set (CGNS_FC_FUNC "${CMAKE_MATCH_1}") set (CGNS_FC_FUNC "${CMAKE_MATCH_1}")
file(REMOVE ${CMAKE_BINARY_DIR}/FCMangle.h) file(REMOVE ${CMAKE_BINARY_DIR}/FCMangle.h)
if(CGNS_FC_FUNC MATCHES "^NAME(.*)") if(CGNS_FC_FUNC MATCHES "^NAME(.*)")
set (FORTRAN_NAMING "UPPERCASE") set (FORTRAN_NAMING "UPPERCASE")
elseif(CGNS_FC_FUNC MATCHES "^name(.*)") elseif(CGNS_FC_FUNC MATCHES "^name(.*)")
set (FORTRAN_NAMING "LOWERCASE") set (FORTRAN_NAMING "LOWERCASE")
endif() endif()
if(CGNS_FC_FUNC MATCHES "(.*)__$") if(CGNS_FC_FUNC MATCHES "(.*)__$")
set (FORTRAN_NAMING "${FORTRAN_NAMING}__") set (FORTRAN_NAMING "${FORTRAN_NAMING}__")
elseif(CGNS_FC_FUNC MATCHES "(.*)_$") elseif(CGNS_FC_FUNC MATCHES "(.*)_$")
set (FORTRAN_NAMING "${FORTRAN_NAMING}_") set (FORTRAN_NAMING "${FORTRAN_NAMING}_")
endif() endif()
message(STATUS "Fortran name mangling convention: ${FORTRAN_NAMING}") message(STATUS "Fortran name mangling convention: ${FORTRAN_NAMING}")
# check that FORTRAN_NAMING is valid # check that FORTRAN_NAMING is valid
if (FORTRAN_NAMING STREQUAL "UNKNOWN") if (FORTRAN_NAMING STREQUAL "UNKNOWN")
if (WIN32) if (WIN32)
set(FORTRAN_NAMING "UPPERCASE" CACHE STRING ${FORTRAN_NAMING_HELP}) set(FORTRAN_NAMING "UPPERCASE" CACHE STRING ${FORTRAN_NAMING_HELP})
else (WIN32) else (WIN32)
set(FORTRAN_NAMING "LOWERCASE_" CACHE STRING ${FORTRAN_NAMING_HELP}) set(FORTRAN_NAMING "LOWERCASE_" CACHE STRING ${FORTRAN_NAMING_HELP})
endif (WIN32) endif (WIN32)
if (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7) if (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
set_property(CACHE FORTRAN_NAMING PROPERTY STRINGS ${F2CLIST}) set_property(CACHE FORTRAN_NAMING PROPERTY STRINGS ${F2CLIST})
endif (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7) endif (${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
else (FORTRAN_NAMING STREQUAL "UNKNOWN") else (FORTRAN_NAMING STREQUAL "UNKNOWN")
skipping to change at line 180 skipping to change at line 187
if (ListIndex LESS 0) if (ListIndex LESS 0)
message(SEND_ERROR "invalid FORTRAN_NAMING value. Must be empty or one of: message(SEND_ERROR "invalid FORTRAN_NAMING value. Must be empty or one of:
LOWERCASE LOWERCASE
LOWERCASE_ LOWERCASE_
LOWERCASE__ LOWERCASE__
UPPERCASE UPPERCASE
UPPERRCASE_ UPPERRCASE_
UPPERRCASE__") UPPERRCASE__")
endif (ListIndex LESS 0) endif (ListIndex LESS 0)
endif (FORTRAN_NAMING STREQUAL "UNKNOWN") endif (FORTRAN_NAMING STREQUAL "UNKNOWN")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSIO
N VERSION_GREATER_EQUAL 10.0)
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
endif()
# Warn about a gfortran 10.2.0 bug (GCC Bug 100149) which
# causes cg_goto_f to segfault, other versions are fine.
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER "10.1" AND
CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "10.3")
message (WARNING "Fortran mapping (cg_goto_f) is broken for the specified gf
ortran version.
!!! IT'S ADVISABLE TO AVOID VERSION 10.2 !!!")
endif()
endif (CGNS_ENABLE_FORTRAN) endif (CGNS_ENABLE_FORTRAN)
# this forces cmake to set up the required Fortran variables # this forces cmake to set up the required Fortran variables
if (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN) if (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN)
enable_language("Fortran") enable_language("Fortran")
endif (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN) endif (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN)
######## ########
# HDF5 # # HDF5 #
######## ########
option(CGNS_ENABLE_HDF5 "Enable or disable HDF5 interface" "OFF") option(CGNS_ENABLE_HDF5 "Enable or disable HDF5 interface" "OFF")
if (CGNS_ENABLE_HDF5) if (CGNS_ENABLE_HDF5)
if (CGNS_BUILD_SHARED) if (CGNS_BUILD_SHARED)
set (FIND_HDF_COMPONENTS C shared) set (FIND_HDF_COMPONENTS C shared)
else (CGNS_BUILD_SHARED) else (CGNS_BUILD_SHARED)
set (FIND_HDF_COMPONENTS C static) set (FIND_HDF_COMPONENTS C static)
set(HDF5_USE_STATIC_LIBRARIES ON)
endif (CGNS_BUILD_SHARED) endif (CGNS_BUILD_SHARED)
message (STATUS "HDF5 find comps: ${FIND_HDF_COMPONENTS}") message (STATUS "HDF5 find comps: ${FIND_HDF_COMPONENTS}")
#set (SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
set (SEARCH_PACKAGE_NAME "hdf5") set (SEARCH_PACKAGE_NAME "hdf5")
# If the first `find_package` below does not succeed, then the legacy `find_pa
ckage`
# is tried (the `else` below). The legacy find_package uses `HDF5_ROOT`. But
if
# this is set, then CMake will issue warning and mistakenly say that `HDF5_ROO
T` is
# not used even though it might be. This can confuse user, so set policy to n
ot
# issue that warning.
if (${CMAKE_VERSION} VERSION_GREATER "3.13")
cmake_policy(SET CMP0074 NEW)
endif()
find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONEN TS}) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONEN TS})
message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and s hared:${HDF5_shared_C_FOUND}") message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and s hared:${HDF5_shared_C_FOUND}")
if (HDF5_FOUND) if (HDF5_FOUND)
add_executable (h5dump IMPORTED)
if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
set (FIND_HDF_COMPONENTS C) set (FIND_HDF_COMPONENTS C)
find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMP ONENTS}) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMP ONENTS})
message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}") message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}")
set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
if (HDF5_BUILD_SHARED_LIBS) if (HDF5_BUILD_SHARED_LIBS)
add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB)
else (HDF5_BUILD_SHARED_LIBS) else (HDF5_BUILD_SHARED_LIBS)
add_definitions (-DH5_BUILT_AS_STATIC_LIB) add_definitions (-DH5_BUILT_AS_STATIC_LIB)
endif (HDF5_BUILD_SHARED_LIBS) endif (HDF5_BUILD_SHARED_LIBS)
if (BUILD_SHARED_LIBS AND WIN32)
set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR
}/h5dumpdll")
else (BUILD_SHARED_LIBS AND WIN32)
set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR
}/h5dump")
endif (BUILD_SHARED_LIBS AND WIN32)
else (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) else (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
if (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) if (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY})
else (HDF5_static_C_FOUND) else (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
endif (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) endif (CGNS_BUILD_SHARED AND HDF5_shared_C_FOUND)
set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/
h5dump")
endif (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) endif (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
set (HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump>)
set (HDF5_HAVE_H5PUBCONF_H 1)
set (HDF5_HAVE_HDF5 1)
set (HDF5_HDF5_HEADER "h5pubconf.h")
set (HDF5_INCLUDE_DIR_GEN ${HDF5_INCLUDE_DIR})
message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR}
TOOLS=${HDF5_TOOLS_DIR}")
else (HDF5_FOUND) else (HDF5_FOUND)
find_package (HDF5) # Legacy find find_package (HDF5) # Legacy find
#Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here
set(HDF5_TOOLS_DIR ${HDF5_LIBRARY_DIRS}/../bin) #Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here
#Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here set(HDF5_TOOLS_DIR ${HDF5_LIBRARY}/../bin)
if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY_DIRS}/libhdf5${CMAKE_SHARED
_LIBRARY_SUFFIX}") #Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here
if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY}/libhdf5${CMAKE_SHARED_LIBR
ARY_SUFFIX}")
set (HDF5_BUILD_SHARED_LIBS 1) set (HDF5_BUILD_SHARED_LIBS 1)
add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB)
else () else ()
set (HDF5_BUILD_SHARED_LIBS 0) set (HDF5_BUILD_SHARED_LIBS 0)
add_definitions (-DH5_BUILT_AS_STATIC_LIB) add_definitions (-DH5_BUILT_AS_STATIC_LIB)
endif () endif ()
set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
add_executable (h5dump IMPORTED)
set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5
dump")
set (HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump>)
endif (HDF5_FOUND) endif (HDF5_FOUND)
set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME})
if (HDF5_FOUND) if (HDF5_FOUND)
if (NOT DEFINED HDF5_INCLUDE_DIRS)
set (HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
endif()
set (HDF5_HAVE_H5PUBCONF_H 1) set (HDF5_HAVE_H5PUBCONF_H 1)
set (HDF5_HAVE_HDF5 1) set (HDF5_HAVE_HDF5 1)
set (HDF5_HDF5_HEADER "h5pubconf.h") set (HDF5_HDF5_HEADER "h5pubconf.h")
set (HDF5_INCLUDE_DIR_GEN ${HDF5_INCLUDE_DIR}) message (STATUS "HDF5-${HDF5_VERSION} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=
message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} ${HDF5_TOOLS_DIR} HDF5_BUILD_SHARED_LIBS=${HDF5_BUILD_SHARED_LIBS}")
TOOLS=${HDF5_TOOLS_DIR} HDF5_BUILD_SHARED_LIBS=${HDF5_BUILD_SHARED_LIBS}") INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
set (HDF5_LIBRARY ${LINK_LIBS}) set (HDF5_LIBRARY ${LINK_LIBS})
message (STATUS "HDF5 link libs: ${LINK_LIBS}") message (STATUS "HDF5 link libs: ${LINK_LIBS}")
else (HDF5_FOUND) else (HDF5_FOUND)
message (FATAL_ERROR " HDF5 was specified but was not found") message (FATAL_ERROR " HDF5 was specified but was not found")
endif (HDF5_FOUND) endif (HDF5_FOUND)
set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?")
if(HDF5_NEED_ZLIB) if(HDF5_NEED_ZLIB)
find_library(ZLIB_LIBRARY z) find_library(ZLIB_LIBRARY z)
mark_as_advanced(CLEAR ZLIB_LIBRARY) mark_as_advanced(CLEAR ZLIB_LIBRARY)
else (HDF5_NEED_ZLIB) else (HDF5_NEED_ZLIB)
mark_as_advanced(FORCE ZLIB_LIBRARY) mark_as_advanced(FORCE ZLIB_LIBRARY)
endif(HDF5_NEED_ZLIB) endif(HDF5_NEED_ZLIB)
set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to szip?")
if (HDF5_NEED_SZIP) if (HDF5_NEED_SZIP)
find_library(SZIP_LIBRARY szip) find_library(SZIP_LIBRARY szip)
mark_as_advanced(CLEAR SZIP_LIBRARY) mark_as_advanced(CLEAR SZIP_LIBRARY)
else (HDF5_NEED_SZIP) else (HDF5_NEED_SZIP)
mark_as_advanced(FORCE SZIP_LIBRARY) mark_as_advanced(FORCE SZIP_LIBRARY)
endif (HDF5_NEED_SZIP) endif (HDF5_NEED_SZIP)
# Check if HDF5 version is 1.8 or greater # Check if HDF5 version is 1.8 or greater
if (HDF5_VERSION VERSION_LESS "1.8.0") if (HDF5_VERSION VERSION_LESS "1.8.0")
message (FATAL_ERROR "HDF5 version must be greater than 1.8.0") message (FATAL_ERROR "HDF5 version must be greater than 1.8.0")
skipping to change at line 329 skipping to change at line 347
endif (HDF5_NEED_MPI) endif (HDF5_NEED_MPI)
mark_as_advanced(CLEAR HDF5_NEED_ZLIB HDF5_NEED_SZIP HDF5_NEED_MPI) mark_as_advanced(CLEAR HDF5_NEED_ZLIB HDF5_NEED_SZIP HDF5_NEED_MPI)
else (CGNS_ENABLE_HDF5) else (CGNS_ENABLE_HDF5)
mark_as_advanced(FORCE HDF5_NEED_ZLIB HDF5_NEED_SZIP HDF5_NEED_MPI) mark_as_advanced(FORCE HDF5_NEED_ZLIB HDF5_NEED_SZIP HDF5_NEED_MPI)
mark_as_advanced(FORCE ZLIB_LIBRARY SZIP_LIBRARY) mark_as_advanced(FORCE ZLIB_LIBRARY SZIP_LIBRARY)
mark_as_advanced(FORCE MPI_C_COMPILER MPI_C_INCLUDE_PATH MPI_C_LIBRARIES) mark_as_advanced(FORCE MPI_C_COMPILER MPI_C_INCLUDE_PATH MPI_C_LIBRARIES)
mark_as_advanced(FORCE MPI_COMPILER MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIB RARY MPIEXEC) mark_as_advanced(FORCE MPI_COMPILER MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIB RARY MPIEXEC)
endif (CGNS_ENABLE_HDF5) endif (CGNS_ENABLE_HDF5)
################# #################
# parallel cgns # # Parallel CGNS #
################# #################
if (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI) if (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
set(CGNS_ENABLE_PARALLEL "OFF" CACHE BOOL "Enable or disable parallel interfac e ?") set(CGNS_ENABLE_PARALLEL "OFF" CACHE BOOL "Enable or disable parallel interfac e ?")
mark_as_advanced(CLEAR CGNS_ENABLE_PARALLEL) mark_as_advanced(CLEAR CGNS_ENABLE_PARALLEL)
# Check that HDF5 has parallel support # Check that HDF5 has parallel support
if (NOT (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) if (NOT (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
message(FATAL_ERROR "HDF5 has been found, but is missing parallel support. ") message(FATAL_ERROR "HDF5 has been found, but is missing parallel support.")
endif() endif()
else (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI) else (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
set(CGNS_ENABLE_PARALLEL "OFF") set(CGNS_ENABLE_PARALLEL "OFF")
mark_as_advanced(FORCE CGNS_ENABLE_PARALLEL) mark_as_advanced(FORCE CGNS_ENABLE_PARALLEL)
endif (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI) endif (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
#################### ####################
# RPATH Management # # RPATH Management #
#################### ####################
skipping to change at line 364 skipping to change at line 382
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# the RPATH to be used when installing # the RPATH to be used when installing
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH # add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH # which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH TRUE) set(CMAKE_MACOSX_RPATH TRUE)
ENDIF() ENDIF()
else(CGNS_BUILD_SHARED) else(CGNS_BUILD_SHARED)
set(CMAKE_SKIP_RPATH TRUE) set(CMAKE_SKIP_RPATH TRUE)
endif(CGNS_BUILD_SHARED) endif(CGNS_BUILD_SHARED)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dashboard and Testing Settings # Dashboard and Testing Settings
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
option (CGNS_BUILD_TESTING "Build CGNS Testing" OFF) option (CGNS_BUILD_TESTING "Build CGNS Testing" OFF)
if (CGNS_BUILD_TESTING) if (CGNS_BUILD_TESTING)
set (DART_TESTING_TIMEOUT 1200 set (DART_TESTING_TIMEOUT "1200"
CACHE INTEGER CACHE STRING
"Timeout in seconds for each test (default 1200=20minutes)" "Timeout in seconds for each test (default 1200=20minutes)"
) )
enable_testing () enable_testing ()
include (CTest) include (CTest)
include (${PROJECT_SOURCE_DIR}/CTestConfig.cmake) include (${PROJECT_SOURCE_DIR}/CTestConfig.cmake)
endif (CGNS_BUILD_TESTING) endif (CGNS_BUILD_TESTING)
######## ########
# CGNS # # CGNS #
######## ########
 End of changes. 38 change blocks. 
64 lines changed or deleted 83 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)