Просмотр исходного кода

fixed gotcha example (or at least disabled it)

Former-commit-id: e82485bedbfffc62ab69f382e70eb852d9d87ecd
Alec Jacobson (jalec 12 лет назад
Родитель
Сommit
d00f8a0a0e
3 измененных файлов с 12 добавлено и 1 удалено
  1. 7 1
      Makefile
  2. 4 0
      examples/eigen-gotchas/example.cpp
  3. 1 0
      include/igl/reorder.h

+ 7 - 1
Makefile

@@ -1,6 +1,12 @@
 .PHONY: all
 all: lib extras examples
 
+GG=g++
+#GG=/usr/bin/g++     17s
+#GG=/usr/bin/clang++ 14s
+#GG=g++-mp-4.3       15.5s
+#GG=g++-mp-4.7       19.9s
+
 # Shared flags etc.
 include Makefile.conf
 $(info Hello, $(IGL_USERNAME)!)
@@ -80,7 +86,7 @@ lib/libigl.a: $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 obj/%.o: include/igl/%.cpp include/igl/%.h
-	g++ $(CFLAGS) $(AFLAGS) -c -o $@ $< $(INC)
+	$(GG) $(CFLAGS) $(AFLAGS) -c -o $@ $< $(INC)
 
 clean:
 	rm -f obj/*.o

+ 4 - 0
examples/eigen-gotchas/example.cpp

@@ -14,6 +14,9 @@ using namespace std;
 #include <igl/print_ijv.h>
 using namespace igl;
 
+#if EIGEN_VERSION_AT_LEAST(3,0,92)
+#  warning these gotchas have not been verified for your Eigen Version
+#else
 // Eigen fails to notice at compile time that the inneriterator used to loop
 // over the contents of a sparsematrix of type T is a different type
 //
@@ -212,6 +215,7 @@ void sparsellt_succeeded_is_meaningless()
     "B_L=sparse(B_LIJV(:,1),B_LIJV(:,2),B_LIJV(:,3),"<<
     B_L.rows()<<","<<B_L.cols()<<");"<<endl;
 }
+#endif
 
 int main(int argc, char * argv[])
 {

+ 1 - 0
include/igl/reorder.h

@@ -2,6 +2,7 @@
 #define IGL_REORDER_H
 #include "igl_inline.h"
 #include <vector>
+#include <cstdlib>
 
 namespace igl
 {