Skip to content

Commit

Permalink
[geogram] Update to 1.7.9
Browse files Browse the repository at this point in the history
  • Loading branch information
simogasp committed Jul 11, 2022
1 parent 1fe72db commit dfc40f6
Show file tree
Hide file tree
Showing 120 changed files with 6,530 additions and 208,042 deletions.
20 changes: 13 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# - it is the first version that fully supports the specification of Visual
# Studio toolsets (v110_xp).
# - it is the version that supports the command string(TIMESTAMP ...)
cmake_minimum_required(VERSION 2.8.11)
# ... set to 2.8.12 (< 2.8.12 has been deprecated)
cmake_minimum_required(VERSION 2.8.12)

# Note: geogram.cmake defines GEOGRAM_WITH_VORPALINE
# that we could have used instead,
# but geogram.cmake needs to be included after the project()
# but geogram.cmake needs to be included after the project()
# command, since project() resets CFLAGS and CXXFLAGS.

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

include(cmake/geogram.cmake)

set(VORPALINE_VERSION_MAJOR 1)
set(VORPALINE_VERSION_MINOR 7)
set(VORPALINE_VERSION_PATCH 7)
set(VORPALINE_VERSION_PATCH 9)
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})

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

if(GEOGRAM_WITH_GARGANTUA)
add_definitions(-DGARGANTUA)
endif()


##############################################################################
# Get SVN revision info

if(GEOGRAM_WITH_VORPALINE)
find_package(Subversion QUIET)
if(NOT SUBVERSION_FOUND)
message(WARNING "Subversion executable not found - cannot determine current revision")
message(WARNING "Subversion executable not found - cannot determine current revision")
else()
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Vorpaline)
message(STATUS "Vorpaline revision is ${Vorpaline_WC_REVISION}")
set(VORPALINE_SVN_REVISION ${Vorpaline_WC_REVISION})
endif()
endif()
endif()

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

if(NOT DEFINED CPACK_GENERATOR)
if(NOT DEFINED CPACK_GENERATOR)
if(WIN32)
set(CPACK_GENERATOR ZIP)
else()
Expand Down
1 change: 1 addition & 0 deletions CMakeOptions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(CPACK_GENERATOR RPM)
18 changes: 18 additions & 0 deletions CMakeOptions.txt.gargantua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Example of CMakeOptions.txt file
# Copy to CMakeOptions.txt, then edit the options:
#
# Setting GARGANTUA mode (64-bit indices), and
# deactivating optional content that is not compatible
# with 64-bit indices.

set(GEOGRAM_WITH_GARGANTUA ON)
set(GEOGRAM_WITH_TETGEN OFF)
set(GEOGRAM_WITH_TRIANGLE OFF)
set(GEOGRAM_WITH_HLBFGS OFF)
set(GEOGRAM_WITH_GRAPHICS OFF)
set(GEOGRAM_WITH_EXPLORAGRAM OFF)
set(GEOGRAM_WITH_LEGACY_NUMERICS OFF)
set(GEOGRAM_WITH_LUA OFF)
set(GEOGRAM_LIB_ONLY ON)


29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022, Bruno Levy
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# geogram

![](https://github.com/BrunoLevy/geogram/wiki/geogram_banner.gif)

Geogram is a programming library with geometric algorithms.
It contains the main results in Geometry Processing from the former
ALICE Inria project, that is, more than 30 research articles published
in ACM SIGGRAPH, ACM Transactions on Graphics, Symposium on Geometry
Processing and Eurographics. It was supported by two grants from the
European Research Council (ERC): GOODSHAPE and VORPALINE.

Links
-----
- Documentation, how to compile, tutorials.... [Geogram Wiki](https://github.com/BrunoLevy/geogram/wiki)
- Programmer's reference manual... [Doxygen](https://brunolevy.github.io/geogram/)
- Releases... [Latest](https://brunolevy.github.io/geogram/Releases/)
- [Graphite](https://github.com/BrunoLevy/GraphiteThree), an experimental 3D modeler built around geogram.
21 changes: 21 additions & 0 deletions cmake/geo_detect_platform.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Sets the CACHE variable VORPALINE_PLATFORM based on the detected operating system.
#
# Note that it would be better to use CMAKE_SYSTEM_NAME directly, and use other CMake
# variables to enable other build-specific flags, e.g.:
# - Use BUILD_SHARED_LIBS to enable behavior specific to shared libs
# - Use CheckCXXCompilerFlag to enable compiler-specific flags
#
if(CMAKE_SYSTEM_NAME MATCHES Linux)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(VORPALINE_PLATFORM "Linux64-gcc-dynamic" CACHE STRING "")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(VORPALINE_PLATFORM "Linux64-clang-dynamic" CACHE STRING "")
endif()
elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
set(VORPALINE_PLATFORM "Darwin-clang-dynamic" CACHE STRING "")
elseif(CMAKE_SYSTEM_NAME MATCHES Windows)
set(VORPALINE_PLATFORM "Win-vs-generic" CACHE STRING "")
elseif(CMAKE_SYSTEM_NAME MATCHES Android)
set(VORPALINE_PLATFORM "Android-aarch64-gcc-dynamic" CACHE STRING "")
endif()
28 changes: 18 additions & 10 deletions cmake/geogram.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if(EXISTS ${GEOGRAM_SOURCE_DIR}/CMakeOptions.txt)
endif()

# Make sure that VORPALINE_PLATFORM is defined
if(NOT DEFINED VORPALINE_PLATFORM)
if(WIN32)
message(
if(NOT VORPALINE_PLATFORM)
if(WIN32)
message(
STATUS
" Using Win-vs-generic (default),\n"
" (if need be, use CMake variable VORPALINE_PLATFORM to override)."
Expand Down Expand Up @@ -39,7 +39,7 @@ endif()

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

if(WIN32)
set(MSVC_CONFIG \$\(Configuration\))
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/${MSVC_CONFIG}/)
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/${MSVC_CONFIG}/)
if(WIN32 AND NOT(CMAKE_GENERATOR STREQUAL "Ninja"))
set(MSVC_CONFIG \$\(Configuration\))
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/${MSVC_CONFIG}/)
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/${MSVC_CONFIG}/)
else()
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/)
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/)
set(RELATIVE_BIN_DIR ${RELATIVE_OUTPUT_DIR}/bin/)
set(RELATIVE_LIB_DIR ${RELATIVE_OUTPUT_DIR}/lib/)
endif()

set(RELATIVE_BIN_OUTPUT_DIR ${RELATIVE_OUTPUT_DIR}/bin/)
Expand Down
4 changes: 4 additions & 0 deletions cmake/opengl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Sets variable OPENGL_LIBRARIES to the list of GL and GLU libraries
#

if(!ANDROID)

set(OpenGL_GL_PREFERENCE GLVND)

find_package(OpenGL)
Expand Down Expand Up @@ -53,3 +55,5 @@ if(GEOGRAM_WITH_EMSCRIPTEN)
else()
set(GLFW_LIBRARIES glfw ${OPENGL_LIBRARIES})
endif()

endif()
6 changes: 1 addition & 5 deletions cmake/platforms/Linux-clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

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

# Set the Clang compilers
set(CMAKE_C_COMPILER "/usr/bin/clang-3.8" CACHE string "clang compiler" FORCE)
set(CMAKE_CXX_COMPILER "/usr/bin/clang++-3.8" CACHE string "clang compiler" FORCE)

# Warning flags
set(NORMAL_WARNINGS -Wall -Wextra)

Expand All @@ -31,7 +27,7 @@ if(VORPALINE_WITH_CLANGSA)
endif()

# I do not know where this -Wno-maybe-uninitialized comes from
# (but clang does not understand it), silence the warning for
# (but clang does not understand it), silence the warning for
# now...
add_flags(CMAKE_CXX_FLAGS -Wno-unknown-warning-option)
add_flags(CMAKE_C_FLAGS -Wno-unknown-warning-option)
Expand Down
8 changes: 7 additions & 1 deletion cmake/platforms/Windows-vs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ remove_flags(CMAKE_C_FLAGS_DEBUG /GZ)
# GX is deprecated (replaced by EHsc)
remove_flags(CMAKE_CXX_FLAGS /GX)

# https://github.com/mozilla/sccache/issues/242
if(CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "sccache")
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
endif()

# Change flags for static link
if(VORPALINE_BUILD_DYNAMIC)
# remove warning for multiply defined symbols (caused by multiple
Expand Down Expand Up @@ -103,4 +109,4 @@ endfunction()
macro(vor_add_executable)
add_executable(${ARGN})
endmacro()

1 change: 1 addition & 0 deletions cmake/utilities.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#!
# @file cmake/utilities.cmake
# @brief Utilities for the Vorpaline build system
Expand Down
Loading

0 comments on commit dfc40f6

Please sign in to comment.