Skip to content
Snippets Groups Projects
Commit 79b857a7 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use tetgen 1.5 by default

parent a81c25ff
No related branches found
No related tags found
No related merge requests found
Showing with 658 additions and 29 deletions
...@@ -19,7 +19,7 @@ project(gmsh CXX C) ...@@ -19,7 +19,7 @@ project(gmsh CXX C)
# this variable controls the default value of the "ENABLE_XXX" options which are # this variable controls the default value of the "ENABLE_XXX" options which are
# normally set to ON (useful if you want to configure a minimal version of Gmsh: # normally set to ON (useful if you want to configure a minimal version of Gmsh:
# e.g. "cmake -DDEFAULT=0 -DENABLE_POST=1 -DENABLE_PARSER=1") # e.g. "cmake -DDEFAULT=0 -DENABLE_POST=1 -DENABLE_PARSER=1")
set(DEFAULT ON CACHE INTERNAL "Default value for options") set(DEFAULT ON CACHE INTERNAL "Default value for enabled-by-default options")
option(ENABLE_ACIS "Enable ACIS geometrical models" ${DEFAULT}) option(ENABLE_ACIS "Enable ACIS geometrical models" ${DEFAULT})
option(ENABLE_ANN "Enable ANN to compute Approximate Nearest Neighbors" ${DEFAULT}) option(ENABLE_ANN "Enable ANN to compute Approximate Nearest Neighbors" ${DEFAULT})
...@@ -61,7 +61,7 @@ option(ENABLE_SLEPC "Enable SLEPc eigensolvers" ${DEFAULT}) ...@@ -61,7 +61,7 @@ option(ENABLE_SLEPC "Enable SLEPc eigensolvers" ${DEFAULT})
option(ENABLE_SOLVER "Enable solver components" ${DEFAULT}) option(ENABLE_SOLVER "Enable solver components" ${DEFAULT})
option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ${DEFAULT}) option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ${DEFAULT})
option(ENABLE_TETGEN "Enable Tetgen mesh generator" ${DEFAULT}) option(ENABLE_TETGEN "Enable Tetgen mesh generator" ${DEFAULT})
option(ENABLE_TETGEN_NEW "Enable experimental version of Tetgen" OFF) option(ENABLE_TETGEN_OLD "Use old version of Tetgen" OFF)
option(ENABLE_VORO3D "Enable Voro3D" ${DEFAULT}) option(ENABLE_VORO3D "Enable Voro3D" ${DEFAULT})
option(ENABLE_WRAP_JAVA "Build Java wrappers" OFF) option(ENABLE_WRAP_JAVA "Build Java wrappers" OFF)
option(ENABLE_WRAP_PYTHON "Build Python wrappers" ${DEFAULT}) option(ENABLE_WRAP_PYTHON "Build Python wrappers" ${DEFAULT})
...@@ -95,7 +95,8 @@ set(GMSH_API ...@@ -95,7 +95,8 @@ set(GMSH_API
Geo/SOrientedBoundingBox.h Geo/CellComplex.h Geo/ChainComplex.h Geo/Cell.h Geo/SOrientedBoundingBox.h Geo/CellComplex.h Geo/ChainComplex.h Geo/Cell.h
Geo/Homology.h Geo/partitionEdge.h Geo/CGNSOptions.h Geo/gmshLevelset.h Geo/Homology.h Geo/partitionEdge.h Geo/CGNSOptions.h Geo/gmshLevelset.h
Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h Mesh/meshPartition.h Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h Mesh/meshPartition.h
Mesh/meshGFaceDelaunayInsertion.h Mesh/simple3D.h Mesh/meshPartitionOptions.h Mesh/Voronoi3D.h Mesh/Levy3D.h Mesh/periodical.h Mesh/meshGFaceDelaunayInsertion.h Mesh/simple3D.h Mesh/meshPartitionOptions.h
Mesh/Voronoi3D.h Mesh/Levy3D.h Mesh/periodical.h
Numeric/mathEvaluator.h Numeric/mathEvaluator.h
Solver/dofManager.h Solver/femTerm.h Solver/laplaceTerm.h Solver/elasticityTerm.h Solver/dofManager.h Solver/femTerm.h Solver/laplaceTerm.h Solver/elasticityTerm.h
Solver/crossConfTerm.h Solver/orthogonalTerm.h Solver/crossConfTerm.h Solver/orthogonalTerm.h
...@@ -141,6 +142,7 @@ endif(APPLE) ...@@ -141,6 +142,7 @@ endif(APPLE)
include(CheckTypeSize) include(CheckTypeSize)
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckCXXCompilerFlag)
if(MSVC) if(MSVC)
# remove annoying warning about bool/int cast performance # remove annoying warning about bool/int cast performance
...@@ -594,17 +596,15 @@ if(HAVE_MESH) ...@@ -594,17 +596,15 @@ if(HAVE_MESH)
set_config_option(HAVE_MMG3D "Mmg3d") set_config_option(HAVE_MMG3D "Mmg3d")
endif(ENABLE_MMG3D) endif(ENABLE_MMG3D)
if(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/TetgenNew/tetgen.h) if(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.5/tetgen.h)
add_subdirectory(contrib/TetgenNew) add_subdirectory(contrib/Tetgen1.5)
include_directories(contrib/TetgenNew) include_directories(contrib/Tetgen1.5)
set_config_option(HAVE_TETGEN "Tetgen(New)") set_config_option(HAVE_TETGEN "Tetgen(1.5)")
add_definitions(-DTETLIBRARY) add_definitions(-DTETLIBRARY)
message("WARNING: You are including an experimental version of Tetgen " elseif(ENABLE_TETGEN_OLD AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.4/tetgen.h)
"that is KNOWN TO BE BUGGY on 64 bits archs and on WIN32/MSVC.") add_subdirectory(contrib/Tetgen1.4)
elseif(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen/tetgen.h) include_directories(contrib/Tetgen1.4)
add_subdirectory(contrib/Tetgen) set_config_option(HAVE_TETGEN "Tetgen(1.4)")
include_directories(contrib/Tetgen)
set_config_option(HAVE_TETGEN "Tetgen")
add_definitions(-DTETLIBRARY) add_definitions(-DTETLIBRARY)
elseif(ENABLE_TETGEN) elseif(ENABLE_TETGEN)
find_library(TETGEN_LIB tet PATH_SUFFIXES lib) find_library(TETGEN_LIB tet PATH_SUFFIXES lib)
...@@ -614,7 +614,7 @@ if(HAVE_MESH) ...@@ -614,7 +614,7 @@ if(HAVE_MESH)
list(APPEND EXTERNAL_INCLUDES ${TETGEN_INC}) list(APPEND EXTERNAL_INCLUDES ${TETGEN_INC})
set_config_option(HAVE_TETGEN "Tetgen") set_config_option(HAVE_TETGEN "Tetgen")
endif(TETGEN_LIB AND TETGEN_INC) endif(TETGEN_LIB AND TETGEN_INC)
endif(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/TetgenNew/tetgen.h) endif(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.5/tetgen.h)
if(HAVE_TETGEN) if(HAVE_TETGEN)
message("WARNING: By including Tetgen you have to comply with Tetgen's " message("WARNING: By including Tetgen you have to comply with Tetgen's "
"special licensing requirements stated in contrib/Tetgen/LICENSE.") "special licensing requirements stated in contrib/Tetgen/LICENSE.")
...@@ -909,13 +909,6 @@ if(DLFCN_H) ...@@ -909,13 +909,6 @@ if(DLFCN_H)
list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS}) list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS})
endif(DLFCN_H) endif(DLFCN_H)
if(UNIX)
# do not optimize some files on Unix
file(GLOB_RECURSE NON_OPTIMIZED_SRC Common/GmshPredicates.cpp Mesh/BDS.cpp
Parser/Gmsh.tab.cpp contrib/Tetgen*/*.cxx)
set_source_files_properties(${NON_OPTIMIZED_SRC} COMPILE_FLAGS "-O0")
endif(UNIX)
if(MSVC) if(MSVC)
add_definitions(-D_USE_MATH_DEFINES -DNOMINMAX add_definitions(-D_USE_MATH_DEFINES -DNOMINMAX
-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE) -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
...@@ -926,6 +919,13 @@ if(WIN32 OR CYGWIN) ...@@ -926,6 +919,13 @@ if(WIN32 OR CYGWIN)
list(APPEND EXTERNAL_LIBRARIES wsock32 ws2_32) list(APPEND EXTERNAL_LIBRARIES wsock32 ws2_32)
endif(WIN32 OR CYGWIN) endif(WIN32 OR CYGWIN)
check_cxx_compiler_flag("-O0" NOOPT)
if(NOOPT)
file(GLOB_RECURSE NON_OPTIMIZED_SRC Numeric/robustPredicates.cpp Mesh/BDS.cpp
Parser/Gmsh.tab.cpp contrib/Tetgen*/*.cxx)
set_source_files_properties(${NON_OPTIMIZED_SRC} COMPILE_FLAGS "-O0")
endif(NOOPT)
list(SORT CONFIG_OPTIONS) list(SORT CONFIG_OPTIONS)
set(GMSH_CONFIG_OPTIONS "") set(GMSH_CONFIG_OPTIONS "")
foreach(OPT ${CONFIG_OPTIONS}) foreach(OPT ${CONFIG_OPTIONS})
...@@ -1054,7 +1054,6 @@ elseif(MSVC) ...@@ -1054,7 +1054,6 @@ elseif(MSVC)
endif(WIN32 AND NOT MSVC OR CYGWIN) endif(WIN32 AND NOT MSVC OR CYGWIN)
# force full warnings to encourage everybody to write clean(er) code # force full warnings to encourage everybody to write clean(er) code
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wall" WALL) check_cxx_compiler_flag("-Wall" WALL)
if(WALL) if(WALL)
set_target_properties(gmsh lib shared PROPERTIES COMPILE_FLAGS "-Wall") set_target_properties(gmsh lib shared PROPERTIES COMPILE_FLAGS "-Wall")
...@@ -1235,7 +1234,7 @@ set(CPACK_SOURCE_GENERATOR TGZ) ...@@ -1235,7 +1234,7 @@ set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}" "/CVS/" "/.svn" "~$" set(CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}" "/CVS/" "/.svn" "~$"
"DS_Store$" "GmshConfig.h$" "GmshVersion.h$" "/benchmarks/" "/tmp/" "DS_Store$" "GmshConfig.h$" "GmshVersion.h$" "/benchmarks/" "/tmp/"
"/bin/" "/lib/" "/nightly/" "GPATH" "GRTAGS" "GSYMS" "GTAGS" "/HTML/" "/bin/" "/lib/" "/nightly/" "GPATH" "GRTAGS" "GSYMS" "GTAGS" "/HTML/"
"/projects/" "/TetgenNew/") #"/Tetgen.*/.*(cxx|h)") "/projects/")
if(UNIX) if(UNIX)
# make sure we remove previous installs before doing the next one # make sure we remove previous installs before doing the next one
......
This diff is collapsed.
...@@ -9,4 +9,4 @@ set(SRC ...@@ -9,4 +9,4 @@ set(SRC
) )
file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
append_gmsh_src(contrib/Tetgen "${SRC};${HDR}") append_gmsh_src(contrib/Tetgen1.4 "${SRC};${HDR}")
File moved
File moved
File moved
File moved
File moved
...@@ -9,4 +9,4 @@ set(SRC ...@@ -9,4 +9,4 @@ set(SRC
) )
file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
append_gmsh_src(contrib/TetgenNew "${SRC};${HDR}") append_gmsh_src(contrib/Tetgen1.5 "${SRC};${HDR}")
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment