Skip to content

Commit 70d6c0f

Browse files
authored
Merge pull request #465 from wildmeshing/remove-warnings
2 parents eb6388a + c715f9b commit 70d6c0f

File tree

140 files changed

+1320
-2059
lines changed

Some content is hidden

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

140 files changed

+1320
-2059
lines changed

.clang-format

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ AllowShortCaseLabelsOnASingleLine: true
4444
AllowShortFunctionsOnASingleLine: Inline
4545

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

5655
# If true, while (true) continue; can be put on a single line.
57-
# Lagrange convention:
5856
# while( condition ) do something; -> YES
5957
# while( condition )
6058
# do something; -> DON'T

.github/workflows/continuous.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
uses: actions/cache@v2
4545
with:
4646
path: ${{ env.CACHE_PATH }}
47-
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache-${{ github.sha }}
48-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache
47+
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
48+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache
4949

5050
- name: Prepare ccache
5151
run: |
@@ -99,8 +99,8 @@ jobs:
9999
uses: actions/cache@v2
100100
with:
101101
path: ${{ env.CACHE_PATH }}
102-
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache-${{ github.sha }}
103-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache
102+
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-cache-${{ github.sha }}
103+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-cache
104104

105105
- name: Prepare ccache
106106
run: |

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
uses: actions/cache@v2
4343
with:
4444
path: ${{ env.CACHE_PATH }}
45-
key: ${{ runner.os }}-Release-${{ matrix.tbb }}-cache-${{ github.sha }}
46-
restore-keys: ${{ runner.os }}-Release-${{ matrix.tbb }}-cache
45+
key: ${{ runner.os }}-Release-cache-${{ github.sha }}
46+
restore-keys: ${{ runner.os }}-Release-cache
4747

4848
- name: Prepare ccache
4949
run: |

CMakeLists.txt

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,14 @@ if(WMTK_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
5959
target_link_options(wmtk_coverage_config INTERFACE --coverage)
6060
endif()
6161

62-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
63-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/recipes/")
64-
65-
# check if Perl is installed (required by HDF5 but not set as required there)
66-
find_package (Perl REQUIRED)
62+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
63+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/recipes/")
6764

6865
include(sanitizers)
66+
include(wmtk_cpm_cache)
6967
include(wmtk_colors)
7068
include(wmtk_warnings)
7169
include(wmtk_copy_dll)
72-
include(tracy)
73-
# Utility function to link libraries as system libraries to avoid warnings
74-
include(WMTKTargetLinkSystemLibraries)
7570

7671
# Sort projects inside the solution
7772
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -84,30 +79,17 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
8479
# ###############################################################################
8580

8681
# Dependencies
87-
include(libigl)
88-
include(spdlog)
8982
include(paraviewo)
90-
include(geogram)
91-
include(onetbb)
92-
include(mshio)
93-
include(metis)
83+
include(spdlog)
9484
include(gmp)
95-
include(probabilistic_quadrics)
96-
97-
# Dependencies for images
98-
include(stb)
99-
include(tinyexr)
100-
101-
102-
include(lagrange)
103-
lagrange_include_modules(bvh)
85+
include(mshio)
86+
include(predicates)
10487

10588
# Core library
10689
add_library(wildmeshing_toolkit)
10790
add_library(wmtk::toolkit ALIAS wildmeshing_toolkit)
10891
target_link_libraries(wildmeshing_toolkit PUBLIC wmtk_coverage_config)
10992

110-
11193
add_subdirectory(src)
11294

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

127109

128110
target_link_libraries(wildmeshing_toolkit PRIVATE wmtk::warnings)
129-
wmtk_target_link_system_libraries(wildmeshing_toolkit PUBLIC
111+
target_link_libraries(wildmeshing_toolkit PUBLIC
130112
spdlog::spdlog
131-
igl::core
132-
igl::predicates
133-
geogram
134-
TBB::tbb
135-
mshio::mshio
136-
lagrange::core
137-
Tracy::TracyClient
138-
lagrange::bvh
139-
probabilistic_quadrics::probabilistic_quadrics
140113
paraviewo::paraviewo
141114
gmp::gmp
142-
143-
144-
miniz # MTAO: I had a build issue with windows not finding miniz at linktime - adding here to make sure it's there?
145-
tinyexr
146-
stb::image
147-
)
148-
149-
include(nlohmann_json)
115+
mshio::mshio
116+
predicates::predicates
117+
)
150118

151119
add_subdirectory(components)
152120

batch_run.py

Lines changed: 0 additions & 146 deletions
This file was deleted.

cmake/WMTKTargetLinkSystemLibraries.cmake

Lines changed: 0 additions & 29 deletions
This file was deleted.

cmake/recipes/CPM.cmake

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
set(CPM_DOWNLOAD_VERSION 0.38.1)
2+
3+
if(CPM_SOURCE_CACHE)
4+
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
5+
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
6+
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
7+
else()
8+
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
9+
endif()
10+
11+
# Expand relative path. This is important if the provided path contains a tilde (~)
12+
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
13+
14+
function(download_cpm)
15+
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
16+
file(DOWNLOAD
17+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
18+
${CPM_DOWNLOAD_LOCATION}
19+
)
20+
endfunction()
21+
22+
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
23+
download_cpm()
24+
else()
25+
# resume download if it previously failed
26+
file(READ ${CPM_DOWNLOAD_LOCATION} check)
27+
if("${check}" STREQUAL "")
28+
download_cpm()
29+
endif()
30+
unset(check)
31+
endif()
32+
33+
include(${CPM_DOWNLOAD_LOCATION})

cmake/recipes/cli11.cmake renamed to cmake/recipes/components/cli11.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ endif()
1515

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

18-
include(FetchContent)
19-
FetchContent_Declare(
20-
cli11
21-
GIT_REPOSITORY https://github.com/CLIUtils/CLI11.git
18+
include(CPM)
19+
CPMAddPackage(
20+
NAME cli11
21+
GITHUB_REPOSITORY CLIUtils/CLI11
2222
GIT_TAG v2.1.2
2323
)
24-
FetchContent_MakeAvailable(cli11)

cmake/recipes/delaunay_psm.cmake renamed to cmake/recipes/components/delaunay_psm.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# delaunay_psm
22

3+
# optional
34

45
if(TARGET geogram::delauanay_psm)
56
return()
67
endif()
78

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

10-
include(FetchContent)
11-
FetchContent_Declare(
12-
delauanay_psm
13-
GIT_REPOSITORY https://github.com/wildmeshing/Delaunay_psm.git
11+
include(CPM)
12+
CPMAddPackage(
13+
NAME delauanay_psm
14+
GITHUB_REPOSITORY wildmeshing/Delaunay_psm
1415
GIT_TAG 3ecb4d6a1ccdcf5f3325a67470f18ae5b4074343
1516
)
16-
FetchContent_MakeAvailable(delauanay_psm)
1717

1818
add_library(delaunay_psm STATIC ${delauanay_psm_SOURCE_DIR}/Delaunay_psm.cpp)
1919
target_compile_definitions(delaunay_psm PUBLIC GEO_STATIC_LIBS)

0 commit comments

Comments
 (0)