Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADDED: a check for cmake version #203

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions cpp/kiss_icp/3rdparty/eigen/eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ include(FetchContent)
FetchContent_Declare(eigen URL https://github.com/nachovizzo/eigen/archive/refs/tags/3.4.90.tar.gz)
if(NOT eigen_POPULATED)
FetchContent_Populate(eigen)
add_subdirectory(${eigen_SOURCE_DIR} ${eigen_BINARY_DIR} SYSTEM EXCLUDE_FROM_ALL)
endif()

if(${CMAKE_VERSION} VERSION_LESS 3.25)
get_target_property(eigen_include_dirs eigen INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(eigen PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${eigen_include_dirs}")
if(${CMAKE_VERSION} GREATER_EQUAL 3.25)
add_subdirectory(${eigen_SOURCE_DIR} ${eigen_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(${eigen_SOURCE_DIR} ${eigen_BINARY_DIR} EXCLUDE_FROM_ALL)
get_target_property(eigen_include_dirs eigen INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(eigen PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${eigen_include_dirs}")
endif()
endif()
15 changes: 9 additions & 6 deletions cpp/kiss_icp/3rdparty/tbb/tbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ include(FetchContent)
FetchContent_Declare(tbb URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.8.0.tar.gz)
if(NOT tbb_POPULATED)
FetchContent_Populate(tbb)
add_subdirectory(${tbb_SOURCE_DIR} ${tbb_BINARY_DIR} SYSTEM 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()
Loading