Skip to content

Commit

Permalink
Merge pull request #465 from wildmeshing/remove-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
teseoch authored Nov 2, 2023
2 parents eb6388a + c715f9b commit 70d6c0f
Show file tree
Hide file tree
Showing 140 changed files with 1,320 additions and 2,059 deletions.
2 changes: 0 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline

# If true, if (a) return; can be put on a single line.
# Lagrange convention:
# if( condition ) do something; -> YES
# if( condition )
# do something; -> DON'T
Expand All @@ -54,7 +53,6 @@ AllowShortIfStatementsOnASingleLine: true
AllowShortLambdasOnASingleLine: All

# If true, while (true) continue; can be put on a single line.
# Lagrange convention:
# while( condition ) do something; -> YES
# while( condition )
# do something; -> DON'T
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache

- name: Prepare ccache
run: |
Expand Down Expand Up @@ -99,8 +99,8 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-cache

- name: Prepare ccache
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-Release-${{ matrix.tbb }}-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-Release-${{ matrix.tbb }}-cache
key: ${{ runner.os }}-Release-cache-${{ github.sha }}
restore-keys: ${{ runner.os }}-Release-cache

- name: Prepare ccache
run: |
Expand Down
52 changes: 10 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,14 @@ if(WMTK_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_link_options(wmtk_coverage_config INTERFACE --coverage)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/recipes/")

# check if Perl is installed (required by HDF5 but not set as required there)
find_package (Perl REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/recipes/")

include(sanitizers)
include(wmtk_cpm_cache)
include(wmtk_colors)
include(wmtk_warnings)
include(wmtk_copy_dll)
include(tracy)
# Utility function to link libraries as system libraries to avoid warnings
include(WMTKTargetLinkSystemLibraries)

# Sort projects inside the solution
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand All @@ -84,30 +79,17 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# ###############################################################################

# Dependencies
include(libigl)
include(spdlog)
include(paraviewo)
include(geogram)
include(onetbb)
include(mshio)
include(metis)
include(spdlog)
include(gmp)
include(probabilistic_quadrics)

# Dependencies for images
include(stb)
include(tinyexr)


include(lagrange)
lagrange_include_modules(bvh)
include(mshio)
include(predicates)

# Core library
add_library(wildmeshing_toolkit)
add_library(wmtk::toolkit ALIAS wildmeshing_toolkit)
target_link_libraries(wildmeshing_toolkit PUBLIC wmtk_coverage_config)


add_subdirectory(src)

# Group source files for IDEs
Expand All @@ -126,27 +108,13 @@ target_compile_features(wildmeshing_toolkit PUBLIC cxx_std_17)


target_link_libraries(wildmeshing_toolkit PRIVATE wmtk::warnings)
wmtk_target_link_system_libraries(wildmeshing_toolkit PUBLIC
target_link_libraries(wildmeshing_toolkit PUBLIC
spdlog::spdlog
igl::core
igl::predicates
geogram
TBB::tbb
mshio::mshio
lagrange::core
Tracy::TracyClient
lagrange::bvh
probabilistic_quadrics::probabilistic_quadrics
paraviewo::paraviewo
gmp::gmp


miniz # MTAO: I had a build issue with windows not finding miniz at linktime - adding here to make sure it's there?
tinyexr
stb::image
)

include(nlohmann_json)
mshio::mshio
predicates::predicates
)

add_subdirectory(components)

Expand Down
146 changes: 0 additions & 146 deletions batch_run.py

This file was deleted.

29 changes: 0 additions & 29 deletions cmake/WMTKTargetLinkSystemLibraries.cmake

This file was deleted.

33 changes: 33 additions & 0 deletions cmake/recipes/CPM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
set(CPM_DOWNLOAD_VERSION 0.38.1)

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

# Expand relative path. This is important if the provided path contains a tilde (~)
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)

function(download_cpm)
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION}
)
endfunction()

if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
download_cpm()
else()
# resume download if it previously failed
file(READ ${CPM_DOWNLOAD_LOCATION} check)
if("${check}" STREQUAL "")
download_cpm()
endif()
unset(check)
endif()

include(${CPM_DOWNLOAD_LOCATION})
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ endif()

message(STATUS "Third-party (external): creating target 'CLI11::CLI11'")

include(FetchContent)
FetchContent_Declare(
cli11
GIT_REPOSITORY https://github.com/CLIUtils/CLI11.git
include(CPM)
CPMAddPackage(
NAME cli11
GITHUB_REPOSITORY CLIUtils/CLI11
GIT_TAG v2.1.2
)
FetchContent_MakeAvailable(cli11)
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# delaunay_psm

# optional

if(TARGET geogram::delauanay_psm)
return()
endif()

message(STATUS "Third-party: creating target 'geogram::delauanay_psm'")

include(FetchContent)
FetchContent_Declare(
delauanay_psm
GIT_REPOSITORY https://github.com/wildmeshing/Delaunay_psm.git
include(CPM)
CPMAddPackage(
NAME delauanay_psm
GITHUB_REPOSITORY wildmeshing/Delaunay_psm
GIT_TAG 3ecb4d6a1ccdcf5f3325a67470f18ae5b4074343
)
FetchContent_MakeAvailable(delauanay_psm)

add_library(delaunay_psm STATIC ${delauanay_psm_SOURCE_DIR}/Delaunay_psm.cpp)
target_compile_definitions(delaunay_psm PUBLIC GEO_STATIC_LIBS)
Expand Down
Loading

0 comments on commit 70d6c0f

Please sign in to comment.