Эх сурвалжийг харах

makefile checks matlab variable

Former-commit-id: 2cafe966010373e11f2c6d6e5d279b751a995886
jalec 13 жил өмнө
parent
commit
e0869218d4

+ 4 - 0
include/igl/matlab/Makefile

@@ -19,6 +19,10 @@ EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
 INC+=$(EIGEN3_INC)
 
 # Matlab dependency
+ifndef MATLAB
+  MATLAB=/Applications/MATLAB_R011b.app/
+  $(warning MATLAB undefined. Setting MATLAB=${MATLAB})
+endif
 MATLAB_INC=-I$(MATLAB)/extern/include/
 MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -leng
 INC+=$(MATLAB_INC)

+ 1 - 1
include/igl/matlab/MatlabWorkspace.cpp

@@ -31,7 +31,7 @@ IGL_INLINE bool igl::MatlabWorkspace::write(const std::string & path) const
   MATFile * mat_file = matOpen(path.c_str(), "w");
   assert(names.size() == data.size());
   // loop over names and data
-  for(int i = 0;i < names.size(); i++)
+  for(int i = 0;i < (int)names.size(); i++)
   {
     // Put variable as LOCAL variable
     int status = matPutVariable(mat_file,names[i].c_str(), data[i]);