Skip to content

Commit ee6f7f0

Browse files
authored
Sync with 96afce5 (#77)
1 parent 0c59061 commit ee6f7f0

File tree

5 files changed

+33
-10
lines changed

5 files changed

+33
-10
lines changed

cmake/lagrange/lagrange_cpm_cache.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ if(DEFINED ENV{CPM_SOURCE_CACHE})
1414
set(CPM_SOURCE_CACHE_DEFAULT $ENV{CPM_SOURCE_CACHE})
1515
else()
1616
# Set CPM cache folder if unset
17-
file(REAL_PATH "~/.cache/CPM" CPM_SOURCE_CACHE_DEFAULT EXPAND_TILDE)
17+
file(REAL_PATH "~" HOME_DIR EXPAND_TILDE)
18+
cmake_path(APPEND HOME_DIR ".cache/CPM" OUTPUT_VARIABLE CPM_SOURCE_CACHE_DEFAULT)
1819
endif()
1920

2021
set(CPM_SOURCE_CACHE

cmake/lagrange/lagrange_tbb_sanitizers.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
# governing permissions and limitations under the License.
1111
#
1212

13-
# Set TBB_SANITIZE based on the USE_SANITIZER option
13+
# Set TBB_SANITIZE based on the USE_SANITIZER option. Even though global options are already enabled
14+
# by our sanitizers.cmake script, setting the TBB_SANITIZE option will let OneTBB disable elements
15+
# incompatible with TSan, such as ITT notifications and LTO:
16+
# https://github.com/uxlfoundation/oneTBB/blob/0cd32ab10a84eabf780bb699b17430deb028c0a4/src/tbbmalloc/CMakeLists.txt#L42
17+
# https://github.com/uxlfoundation/oneTBB/blob/0cd32ab10a84eabf780bb699b17430deb028c0a4/CMakeLists.txt#L254
1418
set(TBB_SANITIZE "")
1519
if(USE_SANITIZER)
1620
if(UNIX)
@@ -29,7 +33,6 @@ if(USE_SANITIZER)
2933
elseif(MSVC)
3034
if(USE_SANITIZER MATCHES "([Aa]ddress)")
3135
set(TBB_SANITIZE "address -fno-omit-frame-pointer")
32-
else()
3336
endif()
3437
endif()
3538
endif()

cmake/recipes/external/assimp.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ include(CPM)
4343
CPMAddPackage(
4444
NAME assimp
4545
GITHUB_REPOSITORY assimp/assimp
46-
GIT_TAG 2f3e72413f25897c1903e883a94fa5cf4293e26b
46+
GIT_TAG v6.0.2
4747

4848
PATCHES
4949
# Prevent Assimp from meddling with compiler flags in debug mode.
5050
# See internal lagrange-lib/#1303 for more details.
5151
# Remember to update this patch when updating Assimp.
52+
# This patch also fixes the compilation issue related to contrib/zlib.
53+
# See https://github.com/assimp/assimp/issues/6118
5254
assimp.patch
5355
)
5456

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
diff --git i/CMakeLists.txt w/CMakeLists.txt
2-
index 517a957f4..0f8594369 100644
3-
--- i/CMakeLists.txt
4-
+++ w/CMakeLists.txt
5-
@@ -339,7 +339,6 @@ ELSEIF(MSVC)
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index cd8f515..90b782a 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -343,7 +343,6 @@ ELSEIF(MSVC)
66
ENDIF()
77
# supress warning for double to float conversion if Double precision is activated
88
ADD_COMPILE_OPTIONS(/wd4244)
99
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
1010
# Allow user to disable PDBs
1111
if(ASSIMP_INSTALL_PDB)
1212
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
13+
diff --git a/contrib/zlib/zutil.h b/contrib/zlib/zutil.h
14+
index 0bc7f4e..e93e4bf 100644
15+
--- a/contrib/zlib/zutil.h
16+
+++ b/contrib/zlib/zutil.h
17+
@@ -142,10 +142,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
18+
# ifndef Z_SOLO
19+
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
20+
# include <unix.h> /* for fdopen */
21+
-# else
22+
-# ifndef fdopen
23+
-# define fdopen(fd,mode) NULL /* No fdopen() */
24+
-# endif
25+
# endif
26+
# endif
27+
#endif

modules/testing/include/lagrange/testing/common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ SurfaceMesh<Scalar, Index> load_surface_mesh(const fs::path& relative_path)
164164
{
165165
auto full_path = get_data_path(relative_path);
166166
REQUIRE(lagrange::fs::exists(full_path));
167-
return lagrange::io::load_mesh<SurfaceMesh<Scalar, Index>>(full_path);
167+
io::LoadOptions options;
168+
options.quiet = true;
169+
return lagrange::io::load_mesh<SurfaceMesh<Scalar, Index>>(full_path, options);
168170
}
169171

170172
///

0 commit comments

Comments
 (0)