From 4a98634f51ece37288790e6525b1ac194c2fe06f Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Sun, 29 Dec 2024 22:50:23 +0100 Subject: [PATCH] remove Eigen alignment detection dead code --- CMakeLists.txt | 25 ++++--------------------- parse-files/eigen_detect_alignment.cpp | 10 ---------- 2 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 parse-files/eigen_detect_alignment.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index f2dabdc0f0..580a6fac9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 diff --git a/parse-files/eigen_detect_alignment.cpp b/parse-files/eigen_detect_alignment.cpp deleted file mode 100644 index 4b96ac8315..0000000000 --- a/parse-files/eigen_detect_alignment.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main(int argc, char** argv) -{ - std::cout << "EIGEN_MAX_ALIGN_BYTES " << EIGEN_MAX_ALIGN_BYTES << "\n" - << "EIGEN_MAX_STATIC_ALIGN_BYTES " << EIGEN_MAX_STATIC_ALIGN_BYTES - << "\n"; - return 0; -}