Commit e98fa33d authored by Christophe Geuzaine's avatar Christophe Geuzaine

add HXT license exception for Gmsh + split HXT/HXT3D

parent fe5072ad
Pipeline #3014 canceled with stage
in 1 minute and 42 seconds
......@@ -1127,6 +1127,9 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/hxt AND
set_config_option(HAVE_HXT "Hxt")
add_subdirectory(contrib/hxt)
include_directories(BEFORE contrib/hxt)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/hxt/hxt_tetDelaunay.c)
set_config_option(HAVE_HXT3D "Hxt3D")
endif()
if(MSVC)
# Visual C++ does not support C99 - force compilation as C++ code
file(GLOB_RECURSE HXT_SRC contrib/hxt/*.c)
......
......@@ -21,6 +21,7 @@
#cmakedefine HAVE_GMM
#cmakedefine HAVE_GMP
#cmakedefine HAVE_HXT
#cmakedefine HAVE_HXT3D
#cmakedefine HAVE_KBIPACK
#cmakedefine HAVE_LAPACK
#cmakedefine HAVE_LIBCGNS
......
......@@ -17,7 +17,8 @@
#include "GmshMessage.h"
#include "BackgroundMeshTools.h"
#ifdef HAVE_HXT
#if defined(HAVE_HXT3D)
extern "C" {
#include "hxt_mesh3d_main.h"
#include "hxt_boundary_recovery.h"
......@@ -370,7 +371,7 @@ int meshGRegionHxt(std::vector<GRegion *> &regions)
int meshGRegionHxt(std::vector<GRegion *> &regions)
{
Msg::Error("Gmsh should be compile with Hxt to enable that option");
Msg::Error("Gmsh should be compiled with Hxt3D to enable this option");
return -1;
}
......
......@@ -3,8 +3,8 @@
# See the LICENSE.txt file for license information. Please report all
# issues on https://gitlab.onelab.info/gmsh/gmsh/issues
# HXT (reparametrization)
set(SRC
hxt_bbox.c
hxt_context.c
hxt_curvature.c
hxt_edge.c
......@@ -12,43 +12,50 @@ set(SRC
hxt_linear_system.c
hxt_linear_system_lu.c
hxt_linear_system_petsc.c
hxt_mean_values.c
hxt_mesh.c
hxt_message.c
hxt_non_linear_solver.c
hxt_option.c
hxt_opt.c
hxt_sort.c
hxt_parametrization.c
hxt_tools.c
predicates.c
)
# HXT3D (3D meshing)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/hxt_tetDelaunay.c)
set(SRC ${SRC}
hxt_bbox.c
hxt_boundary_recovery.cxx
hxt_mesh3d.c
hxt_mesh3d_main.c
hxt_mesh_size.c
hxt_tetOpti.c
hxt_tetRepair.c
hxt_tetUtils.c
hxt_opt.c
hxt_option.c
hxt_sort.c
hxt_tetColor.c
hxt_tetDelaunay.c
hxt_tetFlag.c
hxt_tetOpti.c
hxt_tetPostpro.c
hxt_tetRepair.c
hxt_tetUtils.c
hxt_tet_aspect_ratio.c
hxt_tetDelaunay.c
hxt_vertices.c
hxt_parametrization.c
hxt_mean_values.c
hxt_boundary_recovery.cxx
predicates.c
)
endif()
# do not use arithmetic contraction in predicates.c
if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" )
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS "/fp:strict")
if("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" )
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS
"/fp:strict")
endif()
if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS "-fno-unsafe-math-optimizations -ffp-contract=off")
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS
"-fno-unsafe-math-optimizations -ffp-contract=off")
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS "-fp-model strict")
if(CMAKE_C_COMPILER_ID STREQUAL "Intel")
set_source_files_properties(predicates.c PROPERTIES COMPILE_FLAGS
"-fp-model strict")
endif()
file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
append_gmsh_src(contrib/hxt "${SRC};${HDR}")
Hxt copyright (C) 2017-2018
Universite catholique de Louvain
Universite catholique de Louvain
The TetGen/BR code (tetgenBR.{cxx,h}) is copyright (c) 2016 Hang Si,
Weierstrass Institute for Applied Analysis and Stochatics. It is relicensed
under the terms of gmsh/LICENSE.txt for use in Gmsh thanks to a Software License
Agreement between Weierstrass Institute for Applied Analysis and Stochastics and
GMESH SPRL.
Hxt is provided under the terms of the GNU General Public License
(GPL), Version 2 or later, with the following exception:
The copyright holders of Hxt give you permission to combine Hxt
with code included in the standard release of Gmsh (from C. Geuzaine
and J.-F Remacle) under the Gmsh license. You may copy and distribute
such a system following the terms Gmsh license.
Note that people who make modified versions of Hxt are not
obligated to grant this special exception for their modified
versions; it is their choice whether to do so. The GNU General
Public License gives permission to release a modified version
without this exception; this exception also makes it possible to
release a modified version which carries forward this exception.
End of exception.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
......
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