1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From 19139f84a801022160026be7618d5f49753fe9e7 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Thu, 26 Jan 2023 10:50:31 +0100
Subject: [PATCH] Don't copy Eigen & use system headers
The EIGEN_INCLUDE_DIRS variable does not seem to be exported, therefore we
hardcode the include path.
It also needs to be global, to mimic the embedded version's behavior.
---
src/solver/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/solver/CMakeLists.txt
+++ b/src/solver/CMakeLists.txt
@@ -14,7 +14,7 @@
file(GLOB NMODL_CROUT_SOLVER_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/crout/*.h*")
file(COPY ${NMODL_CROUT_SOLVER_HEADER_FILES} DESTINATION ${CMAKE_BINARY_DIR}/include/crout/)
# Eigen
-file(COPY ${NMODL_PROJECT_SOURCE_DIR}/ext/eigen/Eigen DESTINATION ${CMAKE_BINARY_DIR}/include/)
+#file(COPY ${NMODL_PROJECT_SOURCE_DIR}/ext/eigen/Eigen DESTINATION ${CMAKE_BINARY_DIR}/include/)
# =============================================================================
# Install solver headers and eigen from include
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,7 @@
endif()
# For the moment do not try and use an external Eigen.
cpp_cc_git_submodule(eigen)
+include_directories(SYSTEM "/usr/include/eigen3/")
cpp_cc_git_submodule(fmt BUILD PACKAGE fmt REQUIRED)
# If we're building from the submodule, make sure we pass -fPIC so that we can link the code into a
# shared library later.
|