Skip to content

Commit dfc40f6

Browse files
committed
[geogram] Update to 1.7.9
1 parent 1fe72db commit dfc40f6

File tree

120 files changed

+6530
-208042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+6530
-208042
lines changed

CMakeLists.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
# - it is the first version that fully supports the specification of Visual
77
# Studio toolsets (v110_xp).
88
# - it is the version that supports the command string(TIMESTAMP ...)
9-
cmake_minimum_required(VERSION 2.8.11)
9+
# ... set to 2.8.12 (< 2.8.12 has been deprecated)
10+
cmake_minimum_required(VERSION 2.8.12)
1011

1112
# Note: geogram.cmake defines GEOGRAM_WITH_VORPALINE
1213
# that we could have used instead,
13-
# but geogram.cmake needs to be included after the project()
14+
# but geogram.cmake needs to be included after the project()
1415
# command, since project() resets CFLAGS and CXXFLAGS.
1516

1617
if("$ENV{GEOGRAM_WITH_VORPALINE}" STREQUAL "")
@@ -41,14 +42,15 @@ if(NOT GEOGRAM_SUB_BUILD)
4142
option(GEOGRAM_LIB_ONLY "Libraries only (no example programs/no viewer)" OFF)
4243
option(GEOGRAM_WITH_FPG "Predicate generator (Sylvain Pion's FPG)" OFF)
4344
option(GEOGRAM_USE_SYSTEM_GLFW3 "Use the version of GLFW3 installed in the system if found" OFF)
44-
set(VORPALINE_PLATFORM "" CACHE STRING "")
45+
option(GEOGRAM_WITH_GARGANTUA "64-bit indices" OFF)
46+
include(cmake/geo_detect_platform.cmake)
4547
endif()
4648

4749
include(cmake/geogram.cmake)
4850

4951
set(VORPALINE_VERSION_MAJOR 1)
5052
set(VORPALINE_VERSION_MINOR 7)
51-
set(VORPALINE_VERSION_PATCH 7)
53+
set(VORPALINE_VERSION_PATCH 9)
5254
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})
5355

5456
set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
@@ -64,20 +66,24 @@ string(TIMESTAMP YEAR "%Y")
6466
# This is set by Jenkins in environment variable BUILD_NUMBER
6567
set(VORPALINE_BUILD_NUMBER $ENV{BUILD_NUMBER})
6668

69+
if(GEOGRAM_WITH_GARGANTUA)
70+
add_definitions(-DGARGANTUA)
71+
endif()
72+
6773

6874
##############################################################################
6975
# Get SVN revision info
7076

7177
if(GEOGRAM_WITH_VORPALINE)
7278
find_package(Subversion QUIET)
7379
if(NOT SUBVERSION_FOUND)
74-
message(WARNING "Subversion executable not found - cannot determine current revision")
80+
message(WARNING "Subversion executable not found - cannot determine current revision")
7581
else()
7682
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Vorpaline)
7783
message(STATUS "Vorpaline revision is ${Vorpaline_WC_REVISION}")
7884
set(VORPALINE_SVN_REVISION ${Vorpaline_WC_REVISION})
7985
endif()
80-
endif()
86+
endif()
8187

8288
##############################################################################
8389
# RPATH (where executables find the .so / DLLs)
@@ -176,7 +182,7 @@ if(CPACK_GENERATOR STREQUAL "DEB")
176182
# or GET_PROPERTY(result GLOBAL ENABLED_FEATURES) (successful FIND_PACKAGE())
177183
endif()
178184

179-
if(NOT DEFINED CPACK_GENERATOR)
185+
if(NOT DEFINED CPACK_GENERATOR)
180186
if(WIN32)
181187
set(CPACK_GENERATOR ZIP)
182188
else()

CMakeOptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(CPACK_GENERATOR RPM)

CMakeOptions.txt.gargantua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Example of CMakeOptions.txt file
2+
# Copy to CMakeOptions.txt, then edit the options:
3+
#
4+
# Setting GARGANTUA mode (64-bit indices), and
5+
# deactivating optional content that is not compatible
6+
# with 64-bit indices.
7+
8+
set(GEOGRAM_WITH_GARGANTUA ON)
9+
set(GEOGRAM_WITH_TETGEN OFF)
10+
set(GEOGRAM_WITH_TRIANGLE OFF)
11+
set(GEOGRAM_WITH_HLBFGS OFF)
12+
set(GEOGRAM_WITH_GRAPHICS OFF)
13+
set(GEOGRAM_WITH_EXPLORAGRAM OFF)
14+
set(GEOGRAM_WITH_LEGACY_NUMERICS OFF)
15+
set(GEOGRAM_WITH_LUA OFF)
16+
set(GEOGRAM_LIB_ONLY ON)
17+
18+

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, Bruno Levy
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# geogram
2+
3+
![](https://github.com/BrunoLevy/geogram/wiki/geogram_banner.gif)
4+
5+
Geogram is a programming library with geometric algorithms.
6+
It contains the main results in Geometry Processing from the former
7+
ALICE Inria project, that is, more than 30 research articles published
8+
in ACM SIGGRAPH, ACM Transactions on Graphics, Symposium on Geometry
9+
Processing and Eurographics. It was supported by two grants from the
10+
European Research Council (ERC): GOODSHAPE and VORPALINE.
11+
12+
Links
13+
-----
14+
- Documentation, how to compile, tutorials.... [Geogram Wiki](https://github.com/BrunoLevy/geogram/wiki)
15+
- Programmer's reference manual... [Doxygen](https://brunolevy.github.io/geogram/)
16+
- Releases... [Latest](https://brunolevy.github.io/geogram/Releases/)
17+
- [Graphite](https://github.com/BrunoLevy/GraphiteThree), an experimental 3D modeler built around geogram.

cmake/geo_detect_platform.cmake

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# Sets the CACHE variable VORPALINE_PLATFORM based on the detected operating system.
3+
#
4+
# Note that it would be better to use CMAKE_SYSTEM_NAME directly, and use other CMake
5+
# variables to enable other build-specific flags, e.g.:
6+
# - Use BUILD_SHARED_LIBS to enable behavior specific to shared libs
7+
# - Use CheckCXXCompilerFlag to enable compiler-specific flags
8+
#
9+
if(CMAKE_SYSTEM_NAME MATCHES Linux)
10+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
11+
set(VORPALINE_PLATFORM "Linux64-gcc-dynamic" CACHE STRING "")
12+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
13+
set(VORPALINE_PLATFORM "Linux64-clang-dynamic" CACHE STRING "")
14+
endif()
15+
elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
16+
set(VORPALINE_PLATFORM "Darwin-clang-dynamic" CACHE STRING "")
17+
elseif(CMAKE_SYSTEM_NAME MATCHES Windows)
18+
set(VORPALINE_PLATFORM "Win-vs-generic" CACHE STRING "")
19+
elseif(CMAKE_SYSTEM_NAME MATCHES Android)
20+
set(VORPALINE_PLATFORM "Android-aarch64-gcc-dynamic" CACHE STRING "")
21+
endif()

cmake/geogram.cmake

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ if(EXISTS ${GEOGRAM_SOURCE_DIR}/CMakeOptions.txt)
99
endif()
1010

1111
# Make sure that VORPALINE_PLATFORM is defined
12-
if(NOT DEFINED VORPALINE_PLATFORM)
13-
if(WIN32)
14-
message(
12+
if(NOT VORPALINE_PLATFORM)
13+
if(WIN32)
14+
message(
1515
STATUS
1616
" Using Win-vs-generic (default),\n"
1717
" (if need be, use CMake variable VORPALINE_PLATFORM to override)."
@@ -39,7 +39,7 @@ endif()
3939

4040
if ("${GEOGRAM_WITH_VORPALINE}" STREQUAL ON)
4141
message(STATUS "Configuring build for Geogram + Vorpaline")
42-
add_definitions(-DGEOGRAM_WITH_VORPALINE)
42+
add_definitions(-DGEOGRAM_WITH_VORPALINE)
4343
else()
4444
message(STATUS "Configuring build for standalone Geogram (without Vorpaline)")
4545
endif()
@@ -105,14 +105,22 @@ string(REPLACE ${CMAKE_SOURCE_DIR} "" RELATIVE_OUTPUT_DIR ${CMAKE_BINARY_DIR})
105105
# as an output (does not include configuration name under MSVC, because
106106
# MSVC adds it automatically, thus it would be there twice if we add it).
107107
# This is where plugins are supposed to copy their generated DLL's/so's.
108+
#
109+
# Note: Ideally one should use the generator expressions TARGET_FILE_DIR
110+
# and TARGET_RUNTIME_DLLS to copy runtime dependencies as a post-build
111+
# action. See for example:
112+
# https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_RUNTIME_DLLS
113+
#
114+
# 07/07/2022 replaced "if(WIN32 AND GENERATOR_IS_MULTI_CONFIG)" with
115+
# "if(WIN32)" in test above (was breaking compilation of Graphite).
108116

109-
if(WIN32)
110-
set(MSVC_CONFIG \$\(Configuration\))
111-
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/${MSVC_CONFIG}/)
112-
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/${MSVC_CONFIG}/)
117+
if(WIN32 AND NOT(CMAKE_GENERATOR STREQUAL "Ninja"))
118+
set(MSVC_CONFIG \$\(Configuration\))
119+
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/${MSVC_CONFIG}/)
120+
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/${MSVC_CONFIG}/)
113121
else()
114-
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/)
115-
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/)
122+
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/)
123+
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/)
116124
endif()
117125

118126
set(RELATIVE_BIN_OUTPUT_DIR ${RELATIVE_OUTPUT_DIR}/bin/)

cmake/opengl.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Sets variable OPENGL_LIBRARIES to the list of GL and GLU libraries
44
#
55

6+
if(!ANDROID)
7+
68
set(OpenGL_GL_PREFERENCE GLVND)
79

810
find_package(OpenGL)
@@ -53,3 +55,5 @@ if(GEOGRAM_WITH_EMSCRIPTEN)
5355
else()
5456
set(GLFW_LIBRARIES glfw ${OPENGL_LIBRARIES})
5557
endif()
58+
59+
endif()

cmake/platforms/Linux-clang.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/Linux.cmake)
66

7-
# Set the Clang compilers
8-
set(CMAKE_C_COMPILER "/usr/bin/clang-3.8" CACHE string "clang compiler" FORCE)
9-
set(CMAKE_CXX_COMPILER "/usr/bin/clang++-3.8" CACHE string "clang compiler" FORCE)
10-
117
# Warning flags
128
set(NORMAL_WARNINGS -Wall -Wextra)
139

@@ -31,7 +27,7 @@ if(VORPALINE_WITH_CLANGSA)
3127
endif()
3228

3329
# I do not know where this -Wno-maybe-uninitialized comes from
34-
# (but clang does not understand it), silence the warning for
30+
# (but clang does not understand it), silence the warning for
3531
# now...
3632
add_flags(CMAKE_CXX_FLAGS -Wno-unknown-warning-option)
3733
add_flags(CMAKE_C_FLAGS -Wno-unknown-warning-option)

cmake/platforms/Windows-vs.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ remove_flags(CMAKE_C_FLAGS_DEBUG /GZ)
5353
# GX is deprecated (replaced by EHsc)
5454
remove_flags(CMAKE_CXX_FLAGS /GX)
5555

56+
# https://github.com/mozilla/sccache/issues/242
57+
if(CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "sccache")
58+
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
59+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
60+
endif()
61+
5662
# Change flags for static link
5763
if(VORPALINE_BUILD_DYNAMIC)
5864
# remove warning for multiply defined symbols (caused by multiple
@@ -103,4 +109,4 @@ endfunction()
103109
macro(vor_add_executable)
104110
add_executable(${ARGN})
105111
endmacro()
106-
112+

cmake/utilities.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#!
23
# @file cmake/utilities.cmake
34
# @brief Utilities for the Vorpaline build system

0 commit comments

Comments
 (0)