From 4b22bb7bfad5fcd42fa234d0d8d0c7498dd8f8da Mon Sep 17 00:00:00 2001 From: Benedikt Mersch Date: Wed, 11 Jun 2025 13:09:12 +0200 Subject: [PATCH] Copy from kiss --- .../pybind/3rdparty/sophus/sophus.cmake | 3 +-- src/mapmos/pybind/3rdparty/tbb/tbb.cmake | 19 +++++++++++-------- .../pybind/3rdparty/tsl_robin/tsl_robin.cmake | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mapmos/pybind/3rdparty/sophus/sophus.cmake b/src/mapmos/pybind/3rdparty/sophus/sophus.cmake index c552401..6ebcc9d 100644 --- a/src/mapmos/pybind/3rdparty/sophus/sophus.cmake +++ b/src/mapmos/pybind/3rdparty/sophus/sophus.cmake @@ -25,6 +25,5 @@ set(SOPHUS_USE_BASIC_LOGGING ON CACHE BOOL "Don't use fmt for Sophus libraru") set(BUILD_SOPHUS_TESTS OFF CACHE BOOL "Don't build Sophus tests") set(BUILD_SOPHUS_EXAMPLES OFF CACHE BOOL "Don't build Sophus Examples") -# TODO: after https://github.com/strasdat/Sophus/pull/502 gets merged go back to mainstream -FetchContent_Declare(sophus SYSTEM URL https://github.com/nachovizzo/Sophus/archive/refs/tags/1.22.11.tar.gz) +FetchContent_Declare(sophus SYSTEM URL https://github.com/strasdat/Sophus/archive/refs/tags/1.24.6.tar.gz) FetchContent_MakeAvailable(sophus) diff --git a/src/mapmos/pybind/3rdparty/tbb/tbb.cmake b/src/mapmos/pybind/3rdparty/tbb/tbb.cmake index 7d95b44..84ab7c1 100644 --- a/src/mapmos/pybind/3rdparty/tbb/tbb.cmake +++ b/src/mapmos/pybind/3rdparty/tbb/tbb.cmake @@ -20,7 +20,6 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# option(BUILD_SHARED_LIBS ON) option(BUILD_SHARED_LIBS OFF) option(TBBMALLOC_BUILD OFF) option(TBB_EXAMPLES OFF) @@ -28,13 +27,17 @@ option(TBB_STRICT OFF) option(TBB_TEST OFF) include(FetchContent) -FetchContent_Declare(tbb SYSTEM URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.8.0.tar.gz) +FetchContent_Declare(tbb URL https://github.com/uxlfoundation/oneTBB/archive/refs/tags/v2022.1.0.tar.gz) +FetchContent_GetProperties(tbb) if(NOT tbb_POPULATED) FetchContent_Populate(tbb) - add_subdirectory(${tbb_SOURCE_DIR} ${tbb_BINARY_DIR} EXCLUDE_FROM_ALL) -endif() - -if(${CMAKE_VERSION} VERSION_LESS 3.25) - get_target_property(tbb_include_dirs tbb INTERFACE_INCLUDE_DIRECTORIES) - set_target_properties(tbb PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${tbb_include_dirs}") + if(${CMAKE_VERSION} GREATER_EQUAL 3.25) + add_subdirectory(${tbb_SOURCE_DIR} ${tbb_BINARY_DIR} SYSTEM EXCLUDE_FROM_ALL) + else() + # Emulate the SYSTEM flag introduced in CMake 3.25. Withouth this flag the compiler will + # consider this 3rdparty headers as source code and fail due the -Werror flag. + add_subdirectory(${tbb_SOURCE_DIR} ${tbb_BINARY_DIR} EXCLUDE_FROM_ALL) + get_target_property(tbb_include_dirs tbb INTERFACE_INCLUDE_DIRECTORIES) + set_target_properties(tbb PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${tbb_include_dirs}") + endif() endif() diff --git a/src/mapmos/pybind/3rdparty/tsl_robin/tsl_robin.cmake b/src/mapmos/pybind/3rdparty/tsl_robin/tsl_robin.cmake index a55f948..d70104e 100644 --- a/src/mapmos/pybind/3rdparty/tsl_robin/tsl_robin.cmake +++ b/src/mapmos/pybind/3rdparty/tsl_robin/tsl_robin.cmake @@ -21,5 +21,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. include(FetchContent) -FetchContent_Declare(tessil SYSTEM URL https://github.com/Tessil/robin-map/archive/refs/tags/v1.2.1.tar.gz) +FetchContent_Declare(tessil SYSTEM URL https://github.com/Tessil/robin-map/archive/refs/tags/v1.4.0.tar.gz) FetchContent_MakeAvailable(tessil)