vcpkg/ports/eigen3/remove_configure_checks.patch
Alexander Neumann a8f5cef859
[eigen3] Disable Eigen3 configure checks (#23587)
* [eigen3] remove slow configure checks

* version stuff

Co-authored-by: Alexander Neumann <you@example.com>
2022-03-17 13:52:10 -07:00

38 lines
1.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3e69b845..12fb2188d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,12 +66,14 @@ option(EIGEN_TEST_CXX11 "Enable testing with C++11 and C++11 features (e.g. Tens
macro(ei_add_cxx_compiler_flag FLAG)
+ if(FALSE) # Since eigen3 is header only and vcpkg does not build tests this can be disabled by default.
string(REGEX REPLACE "-" "" SFLAG1 ${FLAG})
string(REGEX REPLACE "\\+" "p" SFLAG ${SFLAG1})
check_cxx_compiler_flag(${FLAG} COMPILER_SUPPORT_${SFLAG})
if(COMPILER_SUPPORT_${SFLAG})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
endif()
+ endif()
endmacro()
check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CPP11)
@@ -142,7 +144,7 @@ endif()
set(EIGEN_TEST_MAX_SIZE "320" CACHE STRING "Maximal matrix/vector size, default is 320")
-if(NOT MSVC)
+if(NOT MSVC AND FALSE)
# We assume that other compilers are partly compatible with GNUCC
# clang outputs some warnings for unknown flags that are not caught by check_cxx_compiler_flag
@@ -330,7 +332,7 @@ if(NOT MSVC)
endif()
endif()
-else()
+elseif(FALSE)
# C4127 - conditional expression is constant
# C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively)