Commit e1a594fe authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cgns: remove from the superbuild

ParaView now has its own internal version.
parent 3aa02238
......@@ -41,7 +41,6 @@ function (superbuild_find_projects var)
list(APPEND projects
boost
bzip2
cgns
freetype
hdf5
ispc
......
......@@ -118,7 +118,6 @@ The following packages enable other features within ParaView:
* `adios`: Enable readers and writers for visualization data in the ADIOS
file format.
* `boxlib`: Enable reading the boxlib3D file format.
* `cgns`: Enable reading the cgns file format.
* `cosmotools`: Enables Cosmo file format readers and related filters and
algorithms.
* `ffmpeg`: Video encoding library for macOS and Linux.
......
......@@ -4,7 +4,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -4,7 +4,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -13,7 +13,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -15,7 +15,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_bzip2 ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -15,7 +15,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_bzip2 ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -14,7 +14,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -14,7 +14,6 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......
......@@ -6,7 +6,6 @@ set(acusolve_fixup_plugin_paths
"<INSTALL_DIR>/lib/Qt=@executable_path/../Frameworks/Qt"
"<INSTALL_DIR>/lib/=@executable_path/../Libraries/"
"libhdf5.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libhdf5_hl.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libcgns.3.1.dylib=@executable_path/../Libraries/libcgns.3.1.dylib")
"libhdf5_hl.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib")
include(paraview.plugin)
set(cgns_need_szip OFF)
set(cgns_need_zlib OFF)
if (hdf5_built_by_superbuild)
if (szip_enabled)
set(cgns_need_szip ON)
endif ()
if (zlib_enabled)
set(cgns_need_zlib ON)
endif ()
endif ()
superbuild_add_project(cgns
DEPENDS hdf5
DEPENDS_OPTIONAL zlib szip
CMAKE_ARGS
-DCGNS_BUILD_SHARED:BOOL=${BUILD_SHARED_LIBS}
-DCGNS_ENABLE_64BIT:BOOL=ON
-DCGNS_ENABLE_HDF5:BOOL=${hdf5_enabled}
-DHDF5_NEED_SZIP:BOOL=${cgns_need_szip}
-DHDF5_NEED_ZLIB:BOOL=${cgns_need_zlib})
superbuild_apply_patch(cgns windows-install
"Fix installation of libraries on Windows")
superbuild_apply_patch(cgns hdf5-cmake
"Fix HDF5 CMake usage")
......@@ -112,7 +112,7 @@ superbuild_add_project(paraview
DEFAULT_ON
DEPENDS_OPTIONAL
cxx11 boost hdf5 matplotlib mpi numpy png
python qt4 qt5 visitbridge zlib silo cgns
python qt4 qt5 visitbridge zlib silo
xdmf3 ospray vrpn vtkm tbb netcdf
paraviewusersguide paraviewgettingstartedguide
paraviewtutorial paraviewtutorialdata paraviewweb
......@@ -135,7 +135,6 @@ superbuild_add_project(paraview
-DPARAVIEW_USE_MPI:BOOL=${mpi_enabled}
-DPARAVIEW_USE_OSPRAY:BOOL=${ospray_enabled}
-DPARAVIEW_USE_VISITBRIDGE:BOOL=${visitbridge_enabled}
-DPARAVIEW_ENABLE_CGNS:BOOL=${cgns_enabled}
-DVISIT_BUILD_READER_CGNS:BOOL=OFF # force to off
-DVISIT_BUILD_READER_GMV:BOOL=${paraview_visit_gmv}
-DVISIT_BUILD_READER_Silo:BOOL=${silo_enabled}
......
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30119a0..e70b6d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,151 +190,19 @@ endif (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN)
option(CGNS_ENABLE_HDF5 "Enable or disable HDF5 interface" "OFF")
if (CGNS_ENABLE_HDF5)
-
- if (CGNS_BUILD_SHARED)
- set (FIND_HDF_COMPONENTS C shared)
- else (CGNS_BUILD_SHARED)
- set (FIND_HDF_COMPONENTS C static)
- endif (CGNS_BUILD_SHARED)
- message (STATUS "HDF5 find comps: ${FIND_HDF_COMPONENTS}")
-
- #set (SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
- set (SEARCH_PACKAGE_NAME "hdf5")
-
- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS})
- message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}")
- if (HDF5_FOUND)
- add_executable (h5dump IMPORTED)
- if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
- set (FIND_HDF_COMPONENTS C)
-
- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS})
- message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}")
- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
- if (HDF5_BUILD_SHARED_LIBS)
- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB)
- else (HDF5_BUILD_SHARED_LIBS)
- add_definitions (-DH5_BUILT_AS_STATIC_LIB)
- 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)
- if (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND)
- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY})
- else (HDF5_static_C_FOUND)
- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
- endif (BUILD_SHARED_LIBS 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)
- 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)
- 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_BUILD_SHARED_LIBS, so we set it here
- if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY_DIRS}/libhdf5.so")
- set (HDF5_BUILD_SHARED_LIBS 1)
- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB)
- else ()
- set (HDF5_BUILD_SHARED_LIBS 0)
- add_definitions (-DH5_BUILT_AS_STATIC_LIB)
- endif ()
- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
-
- add_executable (h5dump IMPORTED)
- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump")
- set (HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump>)
- endif (HDF5_FOUND)
- set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME})
-
- if (HDF5_FOUND)
- 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} HDF5_BUILD_SHARED_LIBS=${HDF5_BUILD_SHARED_LIBS}")
- INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
- set (HDF5_LIBRARY ${LINK_LIBS})
- message (STATUS "HDF5 link libs: ${LINK_LIBS}")
- else (HDF5_FOUND)
- message (FATAL_ERROR " HDF5 was specified but was not found")
- endif (HDF5_FOUND)
-
- set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?")
- if(HDF5_NEED_ZLIB)
- find_library(ZLIB_LIBRARY z)
- mark_as_advanced(CLEAR ZLIB_LIBRARY)
- else (HDF5_NEED_ZLIB)
- mark_as_advanced(FORCE ZLIB_LIBRARY)
- endif(HDF5_NEED_ZLIB)
-
- set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?")
- if (HDF5_NEED_SZIP)
- find_library(SZIP_LIBRARY szip)
- mark_as_advanced(CLEAR SZIP_LIBRARY)
- else (HDF5_NEED_SZIP)
- mark_as_advanced(FORCE SZIP_LIBRARY)
- endif (HDF5_NEED_SZIP)
-
- set(HDF5_NEED_MPI "OFF" CACHE BOOL "Does the HDF5 library require linking to mpi? (Only true if using parallel HDF5)")
- set(MPI_INC)
- set(MPI_LIBS)
- if (HDF5_NEED_MPI)
- if (NOT MPI_FOUND)
- include(FindMPI)
- endif (NOT MPI_FOUND)
- # MPI variable names changed with cmake 2.8.5
- if (DEFINED MPI_C_COMPILER)
- mark_as_advanced(CLEAR MPI_C_COMPILER MPI_C_INCLUDE_PATH MPI_C_LIBRARIES)
- mark_as_advanced(FORCE MPI_LIBRARY MPI_EXTRA_LIBRARY)
- set(MPI_INC ${MPI_C_INCLUDE_PATH})
- set(MPI_LIBS ${MPI_C_LIBRARIES})
- else (DEFINED MPI_C_COMPILER)
- mark_as_advanced(CLEAR MPI_COMPILER MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY)
- set(MPI_INC ${MPI_INCLUDE_PATH})
- if (MPI_EXTRA_LIBRARY)
- set(MPI_LIBS ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
- else (MPI_EXTRA_LIBRARY)
- set(MPI_LIBS ${MPI_LIBRARY})
- endif (MPI_EXTRA_LIBRARY)
- endif (DEFINED MPI_C_COMPILER)
- mark_as_advanced(CLEAR MPIEXEC)
- else (HDF5_NEED_MPI)
- 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_LIBRARY MPIEXEC)
- endif (HDF5_NEED_MPI)
- mark_as_advanced(CLEAR HDF5_NEED_ZLIB HDF5_NEED_SZIP HDF5_NEED_MPI)
-else (CGNS_ENABLE_HDF5)
- 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 MPI_C_COMPILER MPI_C_INCLUDE_PATH MPI_C_LIBRARIES)
- mark_as_advanced(FORCE MPI_COMPILER MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY MPIEXEC)
+ if (NOT CGNS_BUILD_SHARED)
+ set(HDF5_USE_STATIC_LIBRARIES ON)
+ endif ()
+ find_package(HDF5 REQUIRED COMPONENTS C)
endif (CGNS_ENABLE_HDF5)
#################
# parallel cgns #
#################
-if (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
- set(CGNS_ENABLE_PARALLEL "OFF" CACHE BOOL "Enable or disable parallel interface ?")
- mark_as_advanced(CLEAR CGNS_ENABLE_PARALLEL)
- # Check that HDF5 has parallel support
- if (NOT (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
- message(FATAL_ERROR "HDF5 has been found, but is missing parallel support.")
- endif()
-else (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
- set(CGNS_ENABLE_PARALLEL "OFF")
- mark_as_advanced(FORCE CGNS_ENABLE_PARALLEL)
-endif (CGNS_ENABLE_HDF5 AND HDF5_NEED_MPI)
+if (CGNS_ENABLE_HDF5 AND HDF5_IS_PARALLEL)
+ set(CGNS_ENABLE_PARALLEL ON)
+endif (CGNS_ENABLE_HDF5 AND HDF5_IS_PARALLEL)
####################
# RPATH Management #
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9acf50a..720d010 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,20 +11,12 @@ endif (WIN32)
include_directories(.)
if (CGNS_ENABLE_HDF5)
add_definitions(-DBUILD_HDF5)
- if (WIN32)
- if (HDF5_LIBRARY)
- file(STRINGS ${HDF5_LIBRARY} HDF5isDLL REGEX "__imp__H5close")
- if (HDF5isDLL)
- # this is only needed when using hdf5 dll libs
- add_definitions(-DWIN32 -D_HDF5USEDLL_)
- endif (HDF5isDLL)
- endif (HDF5_LIBRARY)
- endif (WIN32)
- if(HDF5_NEED_MPI AND MPI_INC)
- include_directories(${MPI_INC})
- endif(HDF5_NEED_MPI AND MPI_INC)
+ include_directories(${HDF5_INCLUDE_DIRS})
+
if (CGNS_ENABLE_PARALLEL)
add_definitions(-DBUILD_PARALLEL)
+ find_package(MPI REQUIRED COMPONENTS C)
+ include_directories(${MPI_C_INCLUDE_DIRS})
endif (CGNS_ENABLE_PARALLEL)
endif (CGNS_ENABLE_HDF5)
@@ -91,16 +83,7 @@ else (IS_DEBUG)
endif (IS_DEBUG)
set(BUILDHDF5 0)
-set(H5NEEDMPI 0)
-set(H5NEEDSZIP 0)
-set(H5NEEDZLIB 0)
set(BUILDPARALLEL 0)
-set(HDF5INC "")
-set(HDF5LIB "")
-set(SZIPLIB "")
-set(ZLIBLIB "")
-set(MPIINC "")
-set(MPILIBS "")
set(HAVE_FORTRAN_95 0)
set(HAVE_FORTRAN_2003 0)
set(HAVE_FORTRAN_2008 0)
@@ -312,97 +295,15 @@ endmacro(native_paths)
# so use this one.
#-----------------------------------------------------------------------------
-MACRO (CHECK_HDF5_FEATURE FUNCTION CODE VARIABLE)
- IF (NOT DEFINED ${VARIABLE})
- FILE (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_HDF.c
- "${CODE}"
- )
- SET (CHECK_FUNCTION_EXISTS_ADD_INCLUDE "-DINCLUDE_DIRECTORIES:STRING=${HDF5_INCLUDE_DIR}")
- TRY_COMPILE (${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test_HDF.c
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_INCLUDE}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# MESSAGE ( "Test result ${OUTPUT}")
-# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- IF (${VARIABLE})
- SET (${VARIABLE} 1 CACHE INTERNAL "Have HDF5 function ${FUNCTION}")
- MESSAGE (STATUS "Testing HDF5 ${FUNCTION} - OK")
- FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the HDF5 ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- ELSE (${VARIABLE})
- MESSAGE (STATUS "Testing HDF5 ${FUNCTION} - NOT FOUND")
- SET (${VARIABLE} "" CACHE INTERNAL "Have HDF5 function ${FUNCTION}")
- FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the HDF5 ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- ENDIF (${VARIABLE})
- ENDIF (NOT DEFINED ${VARIABLE})
-ENDMACRO (CHECK_HDF5_FEATURE)
-
if (CGNS_ENABLE_HDF5)
set(BUILDHDF5 1)
-# if (HDF5_INCLUDE_PATH)
-# native_paths(HDF5_INCLUDE_PATH HDF5INC)
-# endif (HDF5_INCLUDE_PATH)
-# if (HDF5_LIBRARY)
-# native_paths(HDF5_LIBRARY HDF5LIB)
-# endif (HDF5_LIBRARY)
- if (HDF5_NEED_SZIP)
- set(H5NEEDSZIP 1)
- if (SZIP_LIBRARY)
- native_paths(SZIP_LIBRARY SZIPLIB)
- endif (SZIP_LIBRARY)
- endif (HDF5_NEED_SZIP)
- if (HDF5_NEED_ZLIB)
- set(H5NEEDZLIB 1)
- if (ZLIB_LIBRARY)
- native_paths(${ZLIB_LIBRARY} ZLIBLIB)
- endif (ZLIB_LIBRARY)
- endif (HDF5_NEED_ZLIB)
- if (HDF5_NEED_MPI)
- set(H5NEEDMPI 1)
- if (MPI_INC)
- native_paths(MPI_INC MPIINC)
- endif (MPI_INC)
- if (MPI_LIBS)
- native_paths(MPI_LIBS MPILIBS)
- endif (MPI_LIBS)
- if (CGNS_ENABLE_PARALLEL)
- set(BUILDPARALLEL 1)
- endif (CGNS_ENABLE_PARALLEL)
- endif (HDF5_NEED_MPI)
set(cgns_C_FILES ${cgns_C_FILES} adfh/ADFH.c)
if (CGNS_ENABLE_PARALLEL)
set(cgns_C_FILES ${cgns_C_FILES} pcgnslib.c)
endif (CGNS_ENABLE_PARALLEL)
- # Check if HDF5 library has multi-dataset read/write APIs
- # --------------------------------------------------------------------
-
-CHECK_HDF5_FEATURE(Multi_Dataset
- "
- #include \"hdf5.h\"
- void main(void)
-{
- H5D_rw_multi_t *multi_info;
- return;
-}
- "
- CHECK_HDF5_HAVE_MULTI_DATASETS
- )
- if (CHECK_HDF5_HAVE_MULTI_DATASETS)
- set(HDF5_HAVE_MULTI_DATASETS 1)
- endif (CHECK_HDF5_HAVE_MULTI_DATASETS)
-
+ set(HDF5_HAVE_MULTI_DATASETS 1)
endif (CGNS_ENABLE_HDF5)
#create these in build directory so it doesn't mess up the
@@ -462,27 +363,29 @@ option(CGNS_USE_SHARED "Link programs to the CGNS shared library" "ON")
# Build a static version of the library
add_library(cgns_static STATIC ${cgns_FILES})
+if(CGNS_ENABLE_HDF5)
+ target_link_libraries(cgns_static ${HDF5_LIBRARIES})
+ if(CGNS_BUILD_PARALLEL)
+ target_link_libraries(cgns_static ${MPI_C_LIBRARIES})
+ endif()
+endif()
# Build a shared version of the library
if(CGNS_BUILD_SHARED)
mark_as_advanced(CLEAR CGNS_USE_SHARED)
add_library(cgns_shared SHARED ${cgns_FILES})
+
+ if(CGNS_ENABLE_HDF5)
+ target_link_libraries(cgns_shared ${HDF5_LIBRARIES})
+ if(CGNS_ENABLE_PARALLEL)
+ target_link_libraries(cgns_shared ${MPI_C_LIBRARIES})
+ endif()
+ endif()
+
# under windows we need to define BUILD_DLL
# and link with the HDF5 libraries to build a dll
if (WIN32 OR CYGWIN)
add_definitions(-DBUILD_DLL)
- if (CGNS_ENABLE_HDF5 AND HDF5_LIBRARY)
- target_link_libraries(cgns_shared ${HDF5_LIBRARY})
- if(HDF5_NEED_ZLIB AND ZLIB_LIBRARY)
- target_link_libraries(cgns_shared ${ZLIB_LIBRARY})
- endif(HDF5_NEED_ZLIB AND ZLIB_LIBRARY)
- if(HDF5_NEED_SZIP AND SZIP_LIBRARY)
- target_link_libraries(cgns_shared ${SZIP_LIBRARY})
- endif(HDF5_NEED_SZIP AND SZIP_LIBRARY)
- if(HDF5_NEED_MPI AND MPI_LIBS)
- target_link_libraries(cgns_shared ${MPI_LIBS})
- endif(HDF5_NEED_MPI AND MPI_LIBS)
- endif (CGNS_ENABLE_HDF5 AND HDF5_LIBRARY)
endif (WIN32 OR CYGWIN)
else(CGNS_BUILD_SHARED)
set(CGNS_USE_SHARED "OFF")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 44aa3a2..9acf50a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -516,13 +516,10 @@ endif(CGNS_BUILD_SHARED)
install(TARGETS cgns_static ARCHIVE DESTINATION lib)
# Set the install path of the shared library
if(CGNS_BUILD_SHARED)
- # for windows, need to install both cgnsdll.dll and cgnsdll.lib
- if (WIN32 OR CYGWIN)
- install(TARGETS cgns_shared ARCHIVE DESTINATION lib)
- install(TARGETS cgns_shared RUNTIME DESTINATION lib)
- else (WIN32 OR CYGWIN)
- install(TARGETS cgns_shared LIBRARY DESTINATION lib)
- endif (WIN32 OR CYGWIN)
+ install(TARGETS cgns_shared
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
endif(CGNS_BUILD_SHARED)
# Set the install path of the header files
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 3d8ca70..f9362b4 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -69,12 +69,6 @@ if (WIN32)
install(PROGRAMS
cgnsupdate.bat
DESTINATION bin)
- # lets also put the dll in here so they run
- if (CGNS_USE_SHARED)
- install(PROGRAMS
- ${CMAKE_BINARY_DIR}/src/cgnsdll.dll
- DESTINATION bin)
- endif (CGNS_USE_SHARED)
if (CGNS_ENABLE_HDF5)
install(PROGRAMS
adf2hdf.bat
......@@ -102,12 +102,10 @@ if (matplotlib_enabled)
endif ()
# Test to load various data files to ensure reader support.
if (cgns_enabled)
paraview_add_ui_test("data-csg.silo" "TestData-cs_silo"
"--data=${CMAKE_CURRENT_LIST_DIR}/data/csg.silo")
paraview_add_ui_test("data-5blocks.cgns" "TestData-5blocks_cgns"
"--data=${CMAKE_CURRENT_LIST_DIR}/data/5blocks.cgns")
endif ()
paraview_add_ui_test("data-csg.silo" "TestData-cs_silo"
"--data=${CMAKE_CURRENT_LIST_DIR}/data/csg.silo")
paraview_add_ui_test("data-5blocks.cgns" "TestData-5blocks_cgns"
"--data=${CMAKE_CURRENT_LIST_DIR}/data/5blocks.cgns")
# Disabling this test for now since the Data file is too big. We probably need
# to add support for Data repository similar to ParaView/VTK soon.
......
......@@ -28,10 +28,6 @@ superbuild_set_revision(silo
URL "http://www.paraview.org/files/dependencies/silo-4.9.1-bsd.tar.gz"
URL_MD5 465d2a0a8958b088cde83fb2a5a7eeef)
superbuild_set_revision(cgns
URL "http://www.paraview.org/files/dependencies/cgns-3.3.0.tar.xz"
URL_MD5 01690e4e2b0e2105ee117032f4ee5b0c)
superbuild_set_revision(genericio
URL "http://www.paraview.org/files/dependencies/genericio-master-a15ffc76cfa9f9674f933e8cb5ffc97a97fd7b27.zip"
URL_MD5 daea4ea2076fb6a1b8ccded8e861e1be)
......
Supports Markdown
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