Skip to content

Commit

Permalink
remove Eigen alignment detection dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 29, 2024
1 parent a81d779 commit 4a98634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
25 changes: 4 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -585,26 +585,10 @@ if (NOT MSVC AND MRPT_ENABLE_PRECOMPILED_HDRS)
set_directory_properties(PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) # Disable unity targets
endif()

# Detect Eigen Alignment to make MRPT compatible.
# EIGEN_MAX_ALIGN_BYTES & EIGEN_MAX_STATIC_ALIGN_BYTES with selected compiler flags
# ------------------------------------------------
# DISABLED! Just go for the safer side: align=32 bytes
# get_directory_property(mrpt_root_dir_COMPILE_OPTIONS COMPILE_OPTIONS)
#try_run(RUN_EIGEN_RETVAL BUILD_EIGEN_SUCCESS
# ${CMAKE_BINARY_DIR}
# SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/parse-files/eigen_detect_alignment.cpp"
# COMPILE_DEFINITIONS ""
# CMAKE_FLAGS
# -DINCLUDE_DIRECTORIES:STRING=${MRPT_EIGEN_INCLUDE_DIR}
# -DCMAKE_CXX_FLAGS:STRING="${CMAKE_CXX_FLAGS} ${mrpt_root_dir_COMPILE_OPTIONS}"
# OUTPUT_VARIABLE EIGEN_TEST_OUT)
#if (BUILD_EIGEN_SUCCESS AND (RUN_EIGEN_RETVAL EQUAL 0))
# string(REGEX MATCH "EIGEN_MAX_ALIGN_BYTES[ ]+[0-9]+" EIGEN_MAX_ALIGN_BYTES "${EIGEN_TEST_OUT}")
# string(REGEX MATCH "[0-9]+" EIGEN_MAX_ALIGN_BYTES "${EIGEN_MAX_ALIGN_BYTES}")
# string(REGEX MATCH "EIGEN_MAX_STATIC_ALIGN_BYTES[ ]+[0-9]+" EIGEN_MAX_STATIC_ALIGN_BYTES "${EIGEN_TEST_OUT}")
# string(REGEX MATCH "[0-9]+" EIGEN_MAX_STATIC_ALIGN_BYTES "${EIGEN_MAX_STATIC_ALIGN_BYTES}")
#else()
#message(STATUS "Test Eigen build failed, falling back to default alignment (BUILD_EIGEN_SUCCESS=${BUILD_EIGEN_SUCCESS} RUN_EIGEN_RETVAL=${RUN_EIGEN_RETVAL} BUILD_EIGEN_OUT=${EIGEN_TEST_OUT})")
# Eigen Alignment to make MRPT compatible with different compiler build flags.
# EIGEN_MAX_ALIGN_BYTES & EIGEN_MAX_STATIC_ALIGN_BYTES
# Just go for the safer side: align=32 bytes
# ------------------------------------------------------
if (MRPT_ARCH_INTEL_COMPATIBLE)
set(EIGEN_MAX_ALIGN_BYTES 32)
set(EIGEN_MAX_STATIC_ALIGN_BYTES 32)
Expand All @@ -613,7 +597,6 @@ else()
set(EIGEN_MAX_ALIGN_BYTES 16)
set(EIGEN_MAX_STATIC_ALIGN_BYTES 16)
endif()
#endif()

include(cmakemodules/script_create_config_h.cmake REQUIRED) # Build config.h
include(cmakemodules/script_create_version_h.cmake REQUIRED) # Build version.h
Expand Down
10 changes: 0 additions & 10 deletions parse-files/eigen_detect_alignment.cpp

This file was deleted.

0 comments on commit 4a98634

Please sign in to comment.