Commit 032224c0 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'add-meshkit'

76855160 Local hdf5 for windows
931467a2 Add rgg session
3e89e03a Add meshkit as an optional package
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !491
parents 3b9cddbc 76855160
......@@ -100,6 +100,7 @@ function (superbuild_find_projects var)
qt4
qt5
remus
rggsession
smtk
smtkusersguide
szip
......@@ -113,7 +114,8 @@ function (superbuild_find_projects var)
list(APPEND projects
fontconfig
gperf
libxml2)
libxml2
meshkit)
endif ()
if (WIN32)
......
cmake_minimum_required(VERSION 3.6.1)
project(meshkit-superbuild)
function (superbuild_find_projects var)
set(projects
cgm
cxx11
eigen
hdf5
meshkit
moab
netcdf
szip
zlib)
set("${var}"
${projects}
PARENT_SCOPE)
endfunction ()
function (superbuild_sanity_check)
if (NOT meshkit_enabled)
message(FATAL_ERROR "Meshkit is disabled...")
endif ()
endfunction ()
list(APPEND superbuild_version_files
"${CMAKE_CURRENT_LIST_DIR}/versions.cmake"
"${CMAKE_CURRENT_LIST_DIR}/../versions.cmake")
list(APPEND superbuild_project_roots
"${CMAKE_CURRENT_LIST_DIR}/projects"
"${CMAKE_CURRENT_LIST_DIR}/../projects")
# set the default arguments used for "git clone"
set(_git_clone_arguments_default --progress)
# set the default for meshkit to be enabled for this project
set(_superbuild_default_meshkit ON)
if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../superbuild/CMakeLists.txt")
message(FATAL_ERROR "It appears as though the superbuild infrastructure "
"is missing; did you forget to do `git submodule init` "
"and `git submodule update`?")
endif ()
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../superbuild" "${CMAKE_CURRENT_BINARY_DIR}/superbuild")
superbuild_add_project(cgm
DEPENDS_OPTIONAL cxx11
CMAKE_ARGS
# Set link path on linux
-DCMAKE_INSTALL_RPATH:PATH=$ORIGIN/../lib
# Set link path on OSX
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCGM_OCC:BOOL=OFF
-DUSE_MPI:BOOL=OFF)
superbuild_add_extra_cmake_args(
-DCGM_DIR:PATH=<INSTALL_DIR>/lib/cmake/CGM)
superbuild_add_project(meshkit
DEPENDS moab cgm
CMAKE_ARGS
# Set link path on linux
-DCMAKE_INSTALL_RPATH:PATH=$ORIGIN/../lib
-DCGM_DIR:PATH=<INSTALL_DIR>/lib/cmake/CGM
-DBUILD_ALGS:BOOL=ON
-DBUILD_SRC:BOOL=ON
-DBUILD_UTILS:BOOL=ON
-DBUILD_RGG:BOOL=ON
-DWITH_MPI:BOOL=OFF
-DENABLE_TESTING:BOOL=OFF)
# MOAB has public headers which include Eigen, but it doesn't add the include
# flags properly.
superbuild_append_flags(cxx_flags "-I<INSTALL_DIR>/include/eigen3" PROJECT_ONLY)
superbuild_add_project(moab
DEPENDS cgm eigen netcdf zlib
CMAKE_ARGS
# Set link path on OSX
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DENABLE_IMESH:BOOL=ON
-DENABLE_CGM:BOOL=ON
-DENABLE_NETCDF:BOOL=ON
-DENABLE_IREL:BOOL=ON
-DENABLE_HDF5:BOOL=OFF
-DENABLE_PNETCDF:BOOL=OFF
-DENABLE_MPI:BOOL=OFF
-DENABLE_TESTING:BOOL=OFF
-DNETCDF_ROOT:PATH=<INSTALL_DIR>)
superbuild_apply_patch(moab disable-fortran
"Disable use of fortran")
# By default, linux and os x cmake looks in <INSTALL_DIR>/lib/cmake for
# things. On windows, it does not. So, we set MOAB_DIR to point to the
# location of MOABConfig.cmake for everyone.
superbuild_add_extra_cmake_args(
-DMOAB_DIR:PATH=<INSTALL_DIR>/lib/cmake/MOAB)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc5b0cef..a5b75198 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,24 +2,24 @@ cmake_minimum_required( VERSION 3.0 )
SET(PACKAGE_NAME "MOAB")
SET(PACKAGE_VERSION "5.1.1")
-if (NOT WIN32)
- #This all breaks on windows.
- SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
- SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
- SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
- SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
- SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
-endif()
+#if (NOT WIN32)
+# #This all breaks on windows.
+# SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
+# SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
+# SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+# SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
+# SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+# SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
+# SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
+# SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
+# SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
+#endif()
project( MOAB )
@@ -395,29 +395,29 @@ CONFIGURE_FILE(
IMMEDIATE @ONLY
)
-if (ENABLE_FORTRAN)
- enable_language(Fortran)
-
- # Include CMake's Fortran mangling evaluation macros
- include(FortranCInterface)
-
- if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- set(FC_CASE "NAME")
- else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- set(FC_CASE "name")
- endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
- set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
- endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
- if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
- set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
- endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
-
- set(MOAB_F77_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
- set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
- set(MOAB_FC_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
- set(MOAB_FC_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
-endif (ENABLE_FORTRAN)
+ #if (ENABLE_FORTRAN)
+ # enable_language(Fortran)
+ #
+ # # Include CMake's Fortran mangling evaluation macros
+ # include(FortranCInterface)
+ #
+ # if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # set(FC_CASE "NAME")
+ # else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # set(FC_CASE "name")
+ # endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+ # set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
+ # endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+ # if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+ # set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
+ # endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+ #
+ # set(MOAB_F77_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+ # set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+ # set(MOAB_FC_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+ # set(MOAB_FC_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+ #endif (ENABLE_FORTRAN)
# Generate the CMake input header file and then pass it through configuration
## execute_process( COMMAND cat MOABConfig.h.in COMMAND sed -e "s/#undef /#cmakedefine MOAB_/g"
superbuild_add_project(moab
DEPENDS cgm eigen netcdf zlib
CMAKE_ARGS
# Set link path properly on linux
-DCMAKE_INSTALL_RPATH:PATH=$ORIGIN/../lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DENABLE_BLASLAPACK:BOOL=OFF
-DENABLE_IMESH:BOOL=ON
-DENABLE_CGM:BOOL=ON
-DENABLE_NETCDF:BOOL=ON
-DENABLE_IREL:BOOL=ON
-DENABLE_HDF5:BOOL=OFF
-DENABLE_PNETCDF:BOOL=OFF
-DENABLE_MPI:BOOL=OFF
-DENABLE_TESTING:BOOL=OFF
-DNETCDF_ROOT:PATH=<INSTALL_DIR>)
superbuild_apply_patch(moab disable-fortran
"Disable use of fortran")
# By default, linux and os x cmake looks in <INSTALL_DIR>/lib/cmake for
# things. On windows, it does not. So, we set MOAB_DIR to point to the
# location of MOABConfig.cmake for everyone.
superbuild_add_extra_cmake_args(
-DMOAB_DIR:PATH=<INSTALL_DIR>/lib/cmake/MOAB)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc5b0cef..a5b75198 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,24 +2,24 @@ cmake_minimum_required( VERSION 3.0 )
SET(PACKAGE_NAME "MOAB")
SET(PACKAGE_VERSION "5.1.1")
-if (NOT WIN32)
- #This all breaks on windows.
- SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
- SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
- SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
- SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
- SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
- SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
- SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
-endif()
+#if (NOT WIN32)
+# #This all breaks on windows.
+# SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
+# SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
+# SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+# SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
+# SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+# SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
+# SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
+# SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+# SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
+# SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
+# SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
+#endif()
project( MOAB )
@@ -395,29 +395,29 @@ CONFIGURE_FILE(
IMMEDIATE @ONLY
)
-if (ENABLE_FORTRAN)
- enable_language(Fortran)
-
- # Include CMake's Fortran mangling evaluation macros
- include(FortranCInterface)
-
- if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- set(FC_CASE "NAME")
- else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- set(FC_CASE "name")
- endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
- if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
- set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
- endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
- if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
- set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
- endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
-
- set(MOAB_F77_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
- set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
- set(MOAB_FC_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
- set(MOAB_FC_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
-endif (ENABLE_FORTRAN)
+ #if (ENABLE_FORTRAN)
+ # enable_language(Fortran)
+ #
+ # # Include CMake's Fortran mangling evaluation macros
+ # include(FortranCInterface)
+ #
+ # if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # set(FC_CASE "NAME")
+ # else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # set(FC_CASE "name")
+ # endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+ # if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+ # set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
+ # endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+ # if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+ # set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
+ # endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+ #
+ # set(MOAB_F77_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+ # set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+ # set(MOAB_FC_FUNC "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+ # set(MOAB_FC_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+ #endif (ENABLE_FORTRAN)
# Generate the CMake input header file and then pass it through configuration
## execute_process( COMMAND cat MOABConfig.h.in COMMAND sed -e "s/#undef /#cmakedefine MOAB_/g"
include("${CMAKE_CURRENT_LIST_DIR}/../moab.cmake")
superbuild_apply_patch(moab quote-compiler-path
"Add quotations around compiler path to avoid whitespace warnings.")
superbuild_apply_patch(moab remove-flags-from-link-list
"Remove CMake error where linker flags are a part of the link library list")
superbuild_apply_patch(moab msvc-fixes
"Many windows-specific fixes for moab (not developed on windows).")
diff -Nr -U5 moab/src/GeomQueryTool.cpp moab_patched/src/GeomQueryTool.cpp
--- moab/src/GeomQueryTool.cpp Fri Jan 19 16:55:39 2018
+++ moab_patched/src/GeomQueryTool.cpp Fri Jan 19 16:53:37 2018
@@ -7,10 +7,12 @@
#include <limits>
#include <algorithm>
#include <set>
#include <ctype.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "moab/OrientedBoxTreeTool.hpp"
diff -Nr -U5 moab/src/IntxMesh/Intx2MeshOnSphere.cpp moab_patched/src/IntxMesh/Intx2MeshOnSphere.cpp
--- moab/src/IntxMesh/Intx2MeshOnSphere.cpp Fri Jan 19 16:55:39 2018
+++ moab_patched/src/IntxMesh/Intx2MeshOnSphere.cpp Fri Jan 19 16:53:37 2018
@@ -2,10 +2,13 @@
* Intx2MeshOnSphere.cpp
*
* Created on: Oct 3, 2012
*/
+#define _USE_MATH_DEFINES
+#include <cmath>
+
#include "moab/IntxMesh/Intx2MeshOnSphere.hpp"
#include "moab/IntxMesh/IntxUtils.hpp"
#include "moab/GeomUtil.hpp"
#ifdef MOAB_HAVE_MPI
#include "moab/ParallelComm.hpp"
diff -Nr -U5 moab/src/IntxMesh/IntxUtils.cpp moab_patched/src/IntxMesh/IntxUtils.cpp
--- moab/src/IntxMesh/IntxUtils.cpp Fri Jan 19 16:55:39 2018
+++ moab_patched/src/IntxMesh/IntxUtils.cpp Fri Jan 19 16:53:37 2018
@@ -2,10 +2,11 @@
* IntxUtils.cpp
*
* Created on: Oct 3, 2012
*/
+#define _USE_MATH_DEFINES
#include <math.h>
#include "moab/IntxMesh/IntxUtils.hpp"
// this is from mbcoupler; maybe it should be moved somewhere in moab src
// right now, add a dependency to mbcoupler
// #include "ElemUtil.hpp"
diff -Nr -U5 moab/src/MeshGeneration.cpp moab_patched/src/MeshGeneration.cpp
--- moab/src/MeshGeneration.cpp Fri Jan 19 16:55:39 2018
+++ moab_patched/src/MeshGeneration.cpp Fri Jan 19 16:53:37 2018
@@ -6,10 +6,12 @@
#include "moab/MeshGeneration.hpp"
#include "moab/MergeMesh.hpp"
#include <iostream>
#include <vector>
+#include <time.h>
+
#ifdef MOAB_HAVE_MPI
#include "moab_mpi.h"
#include "moab/ParallelComm.hpp"
#include "MBParallelConventions.h"
#include "moab/ParallelMergeMesh.hpp"
diff -Nr -U5 moab/src/moab/Util.hpp moab_patched/src/moab/Util.hpp
--- moab/src/moab/Util.hpp Fri Jan 19 16:55:40 2018
+++ moab_patched/src/moab/Util.hpp Fri Jan 19 16:53:38 2018
@@ -18,20 +18,23 @@
#include "moab/MOABConfig.h"
#include "moab/Forward.hpp"
#include "moab/CartVect.hpp"
-#include <math.h>
-#if defined MOAB_HAVE_ISFINITE
-#define moab_isfinite(f) isfinite(f)
-#elif defined MOAB_HAVE_STDISFINITE
#include <cmath>
-#define moab_isfinite(f) std::isfinite(f)
+#if defined MOAB_HAVE_ISFINITE
+# define moab_isfinite(f) isfinite(f)
+//If we have c++11 support, we will have std::isfinite
+#elif (defined(__cplusplus) && __cplusplus >= 201103L)
+# define moab_isfinite(f) std::isfinite(f)
+#elif (defined(_WIN32) && defined(_MSC_VER)) || defined(__MINGW32__)
+# include <float.h>
+# define moab_isfinite(A) _finite(A)
#elif defined MOAB_HAVE_FINITE
-#define moab_isfinite(f) finite(f)
+# define moab_isfinite(f) finite(f)
#else
-#define moab_isfinite(f) (!isinf(f) && !isnan(f))
+# define moab_isfinite(f) (!isinf(f) && !isnan(f))
#endif
namespace moab {
/** \class Util
diff -Nr -U5 moab/src/ProgOptions.cpp moab_patched/src/ProgOptions.cpp
--- moab/src/ProgOptions.cpp Fri Jan 19 16:55:40 2018
+++ moab_patched/src/ProgOptions.cpp Fri Jan 19 16:53:38 2018
@@ -1,5 +1,7 @@
+#define NOMINMAX
+#include <algorithm>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdlib>
#include <list>
diff -Nr -U5 moab/test/perf/CMakeLists.txt moab_patched/test/perf/CMakeLists.txt
--- moab/test/perf/CMakeLists.txt Fri Jan 19 16:55:40 2018
+++ moab_patched/test/perf/CMakeLists.txt Fri Jan 19 16:53:38 2018
@@ -11,12 +11,12 @@
perf.cpp
perftool.cpp
umr_perf.cpp )
if ( MOAB_HAVE_IMESH )
- set(TESTS ${TESTS} tstt_perf_binding.cpp)
- set(tstt_perf_binding_CMDARGS 4;B)
+# set(TESTS ${TESTS} tstt_perf_binding.cpp)
+# set(tstt_perf_binding_CMDARGS 4;B)
set(LIBS ${LIBS} iMesh )
endif()
if ( MOAB_HAVE_CGM )
set(LIBS ${LIBS} ${CGM_LIBRARIES})
endif()
diff -Nr -U5 moab/test/spherical_area_test.cpp moab_patched/test/spherical_area_test.cpp
--- moab/test/spherical_area_test.cpp Fri Jan 19 16:55:40 2018
+++ moab_patched/test/spherical_area_test.cpp Fri Jan 19 16:53:38 2018
@@ -1,10 +1,13 @@
/*
* spherical_area_test.cpp
*
* Created on: Feb 1, 2013
*/
+#define _USE_MATH_DEFINES
+#include <math.h>
+
#include <iostream>
#include "moab/Core.hpp"
#include "moab/Interface.hpp"
#include "moab/IntxMesh/IntxUtils.hpp"
#include "TestUtil.hpp"
diff -Nr -U5 moab/test/urefine_mesh_test.cpp moab_patched/test/urefine_mesh_test.cpp
--- moab/test/urefine_mesh_test.cpp Fri Jan 19 16:55:40 2018
+++ moab_patched/test/urefine_mesh_test.cpp Fri Jan 19 16:53:38 2018
@@ -1,10 +1,9 @@
/*This unit test is for the uniform refinement capability based on AHF datastructures*/
#include <iostream>
#include <string>
#include <sstream>
-#include <sys/time.h>
#include <vector>
#include <algorithm>
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/MeshTopoUtil.hpp"
diff -Nr -U5 moab/tools/umr.cpp moab_patched/tools/umr.cpp
--- moab/tools/umr.cpp Fri Jan 19 16:55:41 2018
+++ moab_patched/tools/umr.cpp Fri Jan 19 16:53:39 2018
@@ -3,11 +3,10 @@
#include <vector>
#include <string>
#include <stdio.h>
#include <iomanip>
#include <fstream>
-#include <sys/time.h>
#include <time.h>
#include <math.h>
#include <assert.h>
#include <float.h>
diff -Nr -U5 src/config/MOABConfig.cmake.in src.new/config/MOABConfig.cmake.in
--- src/config/MOABConfig.cmake.in 2017-11-29 11:03:38.000000000 -0500
+++ src.new/config/MOABConfig.cmake.in 2018-01-24 10:26:22.000000000 -0500
@@ -8,14 +8,14 @@
# MOAB_CXX, MOAB_CC, MOAB_F77, MOAB_FC - compilers used to compile MOAB
# MOAB_CXXFLAGS, MOAB_CCFLAGS, MOAB_FFLAGS, MOAB_FCFLAGS - compiler flags used to compile MOAB; possibly need to use these in add_definitions or CMAKE_<LANG>_FLAGS_<MODE>
set(MOAB_FOUND 1)
-set(MOAB_CC @CC@)
-set(MOAB_CXX @CXX@)
-set(MOAB_FC @FC@)
-set(MOAB_F77 @F77@)
+set(MOAB_CC "@CC@")
+set(MOAB_CXX "@CXX@")
+set(MOAB_FC "@FC@")
+set(MOAB_F77 "@F77@")
# Compiler flags used by MOAB
set(MOAB_CFLAGS "@CFLAGS@")
set(MOAB_CXXFLAGS "@CXXFLAGS@")
set(MOAB_FCFLAGS "@FCFLAGS@")
set(MOAB_FFLAGS "@FFLAGS@")
diff -Nr -U5 src/config/MOABConfig.cmake.cmake src_patched/config/MOABConfig.cmake.cmake
--- src/config/MOABConfig.cmake.cmake 2017-11-29 11:03:38.000000000 -0500
+++ src_patched/config/MOABConfig.cmake.cmake 2018-02-14 16:08:31.000000000 -0500
@@ -8,14 +8,14 @@
# MOAB_CXX, MOAB_CC, MOAB_F77, MOAB_FC - compilers used to compile MOAB
# MOAB_CXXFLAGS, MOAB_CCFLAGS, MOAB_FFLAGS, MOAB_FCFLAGS - compiler flags used to compile MOAB; possibly need to use these in add_definitions or CMAKE_<LANG>_FLAGS_<MODE>
set(MOAB_FOUND 1)
-set(MOAB_CC @CMAKE_C_COMPILER@)
-set(MOAB_CXX @CMAKE_CXX_COMPILER@)
-set(MOAB_FC @CMAKE_Fortran_COMPILER@)
-set(MOAB_F77 @CMAKE_Fortran_COMPILER@)
+set(MOAB_CC "@CMAKE_C_COMPILER@")
+set(MOAB_CXX "@CMAKE_CXX_COMPILER@")
+set(MOAB_FC "@CMAKE_Fortran_COMPILER@")
+set(MOAB_F77 "@CMAKE_Fortran_COMPILER@")
# Compiler flags used by MOAB
set(MOAB_CFLAGS "@CFLAGS@")
set(MOAB_CXXFLAGS "@CXXFLAGS@")
set(MOAB_FCFLAGS "@FFLAGS@")
set(MOAB_FFLAGS "@FFLAGS@")
diff -Nr -U5 src/src/CMakeLists.txt src.new/src/CMakeLists.txt
--- src/src/CMakeLists.txt 2017-11-29 11:03:38.000000000 -0500
+++ src.new/src/CMakeLists.txt 2018-01-19 15:58:49.000000000 -0500
@@ -279,11 +279,11 @@
SOVERSION ${MOAB_VERSION_MAJOR}
)
target_link_libraries(
MOAB
- ${CMAKE_EXE_LINKER_FLAGS} ${MOAB_DEP_LIBRARIES} ${MOAB_LIBS} ${MOAB_CGM_LIBS} ${MPI_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
+ ${MOAB_DEP_LIBRARIES} ${MOAB_LIBS} ${MOAB_CGM_LIBS} ${MPI_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
)
install(
TARGETS MOAB
EXPORT MOABTargets
superbuild_set_revision(cgm
GIT_REPOSITORY "https://bitbucket.org/fathomteam/cgm.git"
GIT_TAG 18403e5b100fe8d49a8ac0d6a2e849a0bbeae3bd)
superbuild_set_revision(meshkit
GIT_REPOSITORY "https://haocheng_liu@bitbucket.org/haocheng_liu/meshkit.git"
GIT_TAG osx-10-dot-13-patch)
superbuild_set_revision(moab
GIT_REPOSITORY "https://bitbucket.org/fathomteam/moab.git"
GIT_TAG 78d0b938fcf80fcdfb34fa39583fbce544b56953)
......@@ -135,3 +135,15 @@ install(
DIRECTORY "${superbuild_install_location}/share/cmb/workflows/"
DESTINATION "Workflows"
COMPONENT superbuild)
if (meshkit_enabled)
foreach (meshkit_exe IN ITEMS coregen assygen)
superbuild_apple_install_utility(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
"modelbuilder.app"
"${superbuild_install_location}/bin/${meshkit_exe}"
SEARCH_DIRECTORIES "${library_paths}"
FRAMEWORK_DEST "Frameworks/meshkit"
LIBRARY_DEST "Libraries/meshkit")
endforeach ()
endif ()
# The common superbuild's hdf5 configuration does not set CMAKE_INSTALL_RPATH,
# so we override it with our own hdf5 configuration.
superbuild_add_project(hdf5
CAN_USE_SYSTEM
DEPENDS zlib szip
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_RPATH:PATH=$ORIGIN/../lib
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=TRUE
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=TRUE
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=TRUE
-DHDF5_BUILD_HL_LIB:BOOL=TRUE
-DHDF5_BUILD_WITH_INSTALL_NAME:BOOL=ON)
superbuild_add_extra_cmake_args(
-DHDF5_ROOT:PATH=<INSTALL_DIR>
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE:BOOL=ON)
superbuild_apply_patch(hdf5 fix-ext-pkg-find
"Force proper logic for zlib and szip dependencies")
find_package(HDF5 REQUIRED)
superbuild_add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=${HDF5_C_LIBRARY}
-DHDF5_HL_LIBRARY:FILEPATH=${HDF5_HL_LIBRARY}
-DHDF5_LIBRARY:FILEPATH=${HDF5_LIBRARY}
-DHDF5_INCLUDE_DIRS:PATH=${HDF5_INCLUDE_DIRS})
superbuild_add_project(meshkit
CMAKE_ARGS
-Dsuperbuild_install_location:PATH=<INSTALL_DIR>/meshkit
-Dsuperbuild_download_location:PATH=${superbuild_download_location}
-DUSE_SYSTEM_zlib:BOOL=${USE_SYSTEM_zlib}
INSTALL_COMMAND
"")
diff -u -U5 -r hdf5-1.10.3/CMakeFilters.cmake hdf5-1.10.3.fix-ext-pkg-find/CMakeFilters.cmake
--- hdf5-1.10.3/CMakeFilters.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.fix-ext-pkg-find/CMakeFilters.cmake 2019-03-15 11:53:03.238932850 -0400
@@ -39,13 +39,13 @@
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
- find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ #find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT ZLIB_FOUND)
- find_package (ZLIB) # Legacy find
+ find_package (ZLIB MODULE) # Legacy find
if (ZLIB_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES})
endif ()
endif ()
@@ -90,16 +90,21 @@
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ #find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
- find_package (SZIP) # Legacy find
+ if (WIN32)
+ find_package (SZIP CONFIG) # Legacy find
+ else ()
+ find_package (SZIP) # Legacy find
+ endif ()
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
+ set (SZIP_INCLUDE_DIR ${SZIP_INCLUDE_DIRS})
endif ()
endif ()
endif ()
if (SZIP_FOUND)
set (H5_HAVE_FILTER_SZIP 1)
set(extra_cmake_args)
if (UNIX AND NOT APPLE)
list(APPEND extra_cmake_args
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif ()
set(response_file)
if (WIN32)
# Force response file usage. The command line gets way too long on Windows
# without this. Once VTK_USE_FILE and PARAVIEW_USE_FILE are gone, this can be
# removed again.
set(response_file -DCMAKE_NINJA_FORCE_RESPONSE_FILE:BOOL=ON)
endif ()
superbuild_add_project(rggsession
DEBUGGABLE
DEPENDS boost cxx11 paraview qt qt5 smtk
DEPENDS_OPTIONAL python meshkit
CMAKE_ARGS
${extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DENABLE_PYTHON_WRAPPING:BOOL=${python_enabled}
${response_file})
......@@ -178,3 +178,12 @@ foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})