summaryrefslogtreecommitdiff
path: root/src/cmake
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2022-04-21 14:44:22 +0200
committerGitHub <noreply@github.com>2022-04-21 14:44:22 +0200
commit5857c571388a4349934a266ca187b2c2ac10818c (patch)
tree77895db34b52899efd7860830c6b9e89504a1336 /src/cmake
parent1401feb87f4ee04747d6df7fb1168dfe3dc8cf58 (diff)
Make Windows compilation fails on error (#598)
Use '-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=int' as a workaround
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index 7c982b3b..6a94d1f5 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -19,6 +19,15 @@ if(GMP_FOUND)
endif()
endif()
+# from windows vcpkg eigen 3.4.0#2 : build fails with
+# error C2440: '<function-style-cast>': cannot convert from 'Eigen::EigenBase<Derived>::Index' to '__gmp_expr<mpq_t,mpq_t>'
+# cf. https://gitlab.com/libeigen/eigen/-/issues/2476
+# Workaround is to compile with '-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=int'
+if (FORCE_EIGEN_DEFAULT_DENSE_INDEX_TYPE_TO_INT)
+ message("++ User explicit demand to force EIGEN_DEFAULT_DENSE_INDEX_TYPE to int")
+ add_definitions(-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=int)
+endif()
+
# In CMakeLists.txt, when include(${CGAL_USE_FILE}), CMAKE_CXX_FLAGS are overwritten.
# cf. http://doc.cgal.org/latest/Manual/installation.html#title40
# A workaround is to include(${CGAL_USE_FILE}) before adding "-std=c++11".