[eigen] SuperLU include directories

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Dear all,

I recently noticed that the SuperLU solver wrappers include the required 
super-LU includes without using the superlu/ directory prefix: in the file 
Eigen/SuperLUSupport we have:

	#include <slu_Cnames.h>
	#include <supermatrix.h>
	#include <slu_util.h>

In the case of supermatrix.h, that caused the wrong file to be included on my 
local setup. 

Apart from this 'namespace issue', this scheme has the disadvantage that user 
code needs compiler options, like "-I/usr/include/superlu", that would 
otherwise not be needed in most cases.

I would therefore kindly ask you to consider the attached patch (against 
trunk). It prepends superlu/ to the header names, and instructs cmake to look 
for the directory containing superlu/supermatrix.h instead of supermatrix.h. 
(Being an autotools guy, I have no idea if that CMake part of the patch is all 
that is needed. Please have a look.)

Thank you for your time,

with kind regards,

Jan van Dijk.

diff -r 32b190205cfb Eigen/SuperLUSupport
--- a/Eigen/SuperLUSupport	Sat Feb 02 22:04:42 2013 +0000
+++ b/Eigen/SuperLUSupport	Sun Feb 17 18:01:20 2013 +0100
@@ -10,9 +10,9 @@
 #endif
 
 typedef int int_t;
-#include <slu_Cnames.h>
-#include <supermatrix.h>
-#include <slu_util.h>
+#include <superlu/slu_Cnames.h>
+#include <superlu/supermatrix.h>
+#include <superlu/slu_util.h>
 
 // slu_util.h defines a preprocessor token named EMPTY which is really polluting,
 // so we remove it in favor of a SUPERLU_EMPTY token.
diff -r 32b190205cfb cmake/FindSuperLU.cmake
--- a/cmake/FindSuperLU.cmake	Sat Feb 02 22:04:42 2013 +0000
+++ b/cmake/FindSuperLU.cmake	Sun Feb 17 18:01:20 2013 +0100
@@ -8,7 +8,7 @@
 
 find_path(SUPERLU_INCLUDES
   NAMES
-  supermatrix.h
+  superlu/supermatrix.h
   PATHS
   $ENV{SUPERLUDIR}
   ${INCLUDE_INSTALL_DIR}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/