diff --git a/cMake/FreeCAD_Helpers/SetupEigen.cmake b/cMake/FreeCAD_Helpers/SetupEigen.cmake index 48ae286728..492519a9d9 100644 --- a/cMake/FreeCAD_Helpers/SetupEigen.cmake +++ b/cMake/FreeCAD_Helpers/SetupEigen.cmake @@ -11,14 +11,14 @@ macro(SetupEigen) "=================\n") endif(NOT EIGEN3_FOUND) - if (${EIGEN3_VERSION} VERSION_LESS "3.3.1") + if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.1") message(WARNING "Disable module flatmesh because it requires " "minimum Eigen3 version 3.3.1 but version ${EIGEN3_VERSION} was found") set (BUILD_FLAT_MESH OFF) endif() # Older versions raise the warning -Wdeprecated-copy with clang10/gcc10 - if (${EIGEN3_VERSION} VERSION_LESS "3.3.8") + if (EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_LESS "3.3.8") unset(_flag_found CACHE) check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found) if (_flag_found)