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

Remove personal workspaces #329

Merged
merged 32 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9542abb
EXCLUDE_FROM_ALL goes into the FetchContent_Declare so that we can use
tizianoGuadagnino Apr 16, 2024
aedac45
Getting closer, now SYSTEM flag is not FetchContent_Declare
tizianoGuadagnino Apr 16, 2024
45e1f4e
Now it should be done
tizianoGuadagnino Apr 16, 2024
faeba7a
Final cleaning
tizianoGuadagnino Apr 16, 2024
4a5d165
TO BE REVERTED -> Remove personal repos
tizianoGuadagnino Apr 17, 2024
3215d29
lets see if sophus got fixed, otherwise revert
tizianoGuadagnino Apr 17, 2024
54386c4
Try again other ciao ciao
tizianoGuadagnino Apr 17, 2024
d44a092
Revert "TO BE REVERTED -> Remove personal repos"
tizianoGuadagnino Apr 17, 2024
a156481
TO BE REVERTED -> Remove personal repos
tizianoGuadagnino Apr 17, 2024
3b11a28
Apply sophus patch
benemer Apr 17, 2024
d1a4918
Format
benemer Apr 17, 2024
8b932d6
Add back todo
benemer Apr 17, 2024
2009c5c
Fix patch file not found
benemer Apr 17, 2024
9484f18
I finally use pre-commit :)
benemer Apr 17, 2024
9113340
patch got corrupted
benemer Apr 17, 2024
528d196
Let's see if this path passes pre-commits and the build
benemer Apr 17, 2024
809f71c
Back to original patch
benemer Apr 17, 2024
ab1f9f5
remove whitespace
benemer Apr 17, 2024
daf19ea
Ignore patch in pre-commit eof check
benemer Apr 17, 2024
3f42610
Try this for Windows
benemer Apr 17, 2024
6ca8fdd
Next try
benemer Apr 17, 2024
88cc2a7
Revert up to "TO BE REVERTED -> Remove personal repos"
benemer Apr 17, 2024
c1491c0
Remove these, will be separate PR
benemer Apr 17, 2024
91deba3
Remove personal repos
benemer Apr 17, 2024
0f24290
Can remove, because has been cherry-picked in https://gitlab.com/libe…
benemer Apr 17, 2024
34a87f8
Skip patch files
benemer Apr 17, 2024
356fc92
For now keep this separated
benemer Apr 17, 2024
928ef97
Remove comment
benemer Apr 17, 2024
e5db6ab
Add back
benemer Apr 17, 2024
3aa41e8
Merge branch 'main' into benedikt/remove_personal_repos
benemer Apr 17, 2024
c1b3836
Patch Sophus without git
benemer Apr 17, 2024
35a7063
Patch Eigen without git
benemer Apr 17, 2024
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
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ repos:
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: \.patch$
- id: end-of-file-fixer
exclude: \.patch$
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-clang-format
Expand Down
7 changes: 2 additions & 5 deletions cpp/kiss_icp/3rdparty/eigen/eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# TODO: Yet another manual release dne by nacho. This should be updated whenever the Eigen team
# release a new version that is not 3.4. That version does not include this necessary changes:
# - https://gitlab.com/libeigen/eigen/-/merge_requests/893/diffs

set(EIGEN_BUILD_DOC OFF CACHE BOOL "Don't build Eigen docs")
set(EIGEN_BUILD_TESTING OFF CACHE BOOL "Don't build Eigen tests")
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "Don't build Eigen pkg-config")
set(EIGEN_BUILD_BLAS OFF CACHE BOOL "Don't build blas module")
set(EIGEN_BUILD_LAPACK OFF CACHE BOOL "Don't build lapack module")

include(FetchContent)
FetchContent_Declare(eigen URL https://github.com/nachovizzo/eigen/archive/refs/tags/3.4.90.tar.gz)
FetchContent_Declare(eigen URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/eigen.patch UPDATE_DISCONNECTED 1)
FetchContent_GetProperties(eigen)
if(NOT eigen_POPULATED)
FetchContent_Populate(eigen)
Expand Down
74 changes: 74 additions & 0 deletions cpp/kiss_icp/3rdparty/eigen/eigen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
commit cf82186416d04ea5df2a397d8fe09dc78d40ca65
nachovizzo marked this conversation as resolved.
Show resolved Hide resolved
Author: Antonio Sánchez <cantonios@google.com>
Date: Sat Mar 5 05:49:45 2022 +0000

Adds new CMake Options for controlling build components.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index de1c23e91..0af36a53a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -477,6 +477,9 @@ if(EIGEN_BUILD_TESTING)
add_subdirectory(failtest)
endif()

+include(CMakeDetermineFortranCompiler)
+option(EIGEN_BUILD_BLAS "Toggles the building of the Eigen Blas library" ${CMAKE_Fortran_COMPILER})
+option(EIGEN_BUILD_LAPACK "Toggles the building of the included Eigen LAPACK library" ${CMAKE_Fortran_COMPILER})
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
add_subdirectory(blas)
add_subdirectory(lapack)
@@ -611,6 +614,8 @@ set_target_properties (eigen PROPERTIES EXPORT_NAME Eigen)

install (TARGETS eigen EXPORT Eigen3Targets)

+option(EIGEN_BUILD_CMAKE_PACKAGE "Enables the creation of EigenConfig.cmake and related files" ON)
+if(EIGEN_BUILD_CMAKE_PACKAGE)
configure_package_config_file (
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
@@ -655,6 +660,7 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
# Add uninstall target
add_custom_target ( uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)
+endif()

if (EIGEN_SPLIT_TESTSUITE)
ei_split_testsuite("${EIGEN_SPLIT_TESTSUITE}")
diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt
index 8d3cb86dc..c530957fb 100644
--- a/blas/CMakeLists.txt
+++ b/blas/CMakeLists.txt
@@ -1,6 +1,7 @@

project(EigenBlas CXX)

+if(EIGEN_BUILD_BLAS)
include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
@@ -59,4 +60,4 @@ if(EIGEN_BUILD_TESTING)
endif()

endif()
-
+endif()
diff --git a/lapack/CMakeLists.txt b/lapack/CMakeLists.txt
index c8ca64001..8d6d75401 100644
--- a/lapack/CMakeLists.txt
+++ b/lapack/CMakeLists.txt
@@ -1,5 +1,7 @@
project(EigenLapack CXX)

+if(EIGEN_BUILD_LAPACK AND EIGEN_BUILD_BLAS)
+
include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
@@ -457,3 +459,6 @@ if(EXISTS ${eigen_full_path_to_testing_lapack})

endif()

+elseif(EIGEN_BUILD_LAPACK AND NOT EIGEN_BUILD_BLAS)
+ message(FATAL_ERROR "EIGEN_BUILD_LAPACK requires EIGEN_BUILD_BLAS")
+endif() #EIGEN_BUILD_LAPACK
5 changes: 3 additions & 2 deletions cpp/kiss_icp/3rdparty/sophus/sophus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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.22.10.tar.gz
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/sophus.patch UPDATE_DISCONNECTED 1)

FetchContent_MakeAvailable(sophus)
13 changes: 13 additions & 0 deletions cpp/kiss_icp/3rdparty/sophus/sophus.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/sophus/common.hpp b/sophus/common.hpp
index 5634d35b..56a1b590 100644
--- a/sophus/common.hpp
+++ b/sophus/common.hpp
@@ -18,7 +18,7 @@
#define SOPHUS_FMT_CSTR(description, ...) description
#define SOPHUS_FMT_STR(description, ...) std::string(description)
#define SOPHUS_FMT_PRINT(description, ...) std::printf("%s\n", description)
-#define SOPHUS_FMT_ARG(arg)
+#define SOPHUS_FMT_ARG(arg) arg

#else // !SOPHUS_USE_BASIC_LOGGING

Loading