Clemens-Alexander Brust il y a 11 ans
Parent
commit
3a5588304d

+ 4 - 0
baselib/progs/scaleKernelMatrix.cpp

@@ -19,7 +19,11 @@ using namespace NICE;
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
     Config conf ( argc, argv );
     

+ 5 - 0
baselib/progs/testProgressBar.cpp

@@ -34,7 +34,12 @@ using namespace std;
 
 int main(int argc, char **argv)
 {
+#ifndef __clang__
+#ifndef __llvm__
 	std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
+
 	Config mainconf(argc, argv);
 
 	OBJREC::ProgressBar P;

+ 5 - 0
cbaselib/ClassNames.cpp

@@ -395,7 +395,12 @@ void ClassNames::getClassnoFromColor ( int & classno, int r, int g, int b ) cons
   boost::unordered_map<long, int>::const_iterator i = tbl_color_classno.find ( color );
 #else
 //  __gnu_cxx::hash_map<long, int>::const_iterator i = tbl_color_classno.find ( color );
+#ifdef __clang__
+  std::unordered_map<long, int>::const_iterator i = tbl_color_classno.find(color);
+#else
   std::tr1::unordered_map<long, int>::const_iterator i = tbl_color_classno.find ( color );  
+#endif
+
 #endif
 
   if ( i == tbl_color_classno.end() )

+ 8 - 0
cbaselib/ClassNames.h

@@ -23,8 +23,12 @@
 #endif
 #else
 //#include <ext/hash_map>
+#ifdef __clang__
+#include <unordered_map>
+#else
 #include <tr1/unordered_map>
 #endif
+#endif
 
 #include "core/basics/Config.h"
 #include "core/basics/Persistent.h"
@@ -46,7 +50,11 @@ class ClassNames : public NICE::Persistent
     boost::unordered_map<long, int> tbl_color_classno;
 #else
 //	__gnu_cxx::hash_map<long, int> tbl_color_classno;
+#ifdef __clang__
+    std::unordered_map<long, int> tbl_color_classno;
+#else
     std::tr1::unordered_map<long, int> tbl_color_classno;
+#endif
 #endif
     std::map<int, long> tbl_classno_color;
 

+ 4 - 0
cbaselib/progs/calcCurves.cpp

@@ -49,7 +49,11 @@ void readResults ( const string & resultsfn, vector<pair<double, int> > & result
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
 	Config conf ( argc, argv );
 

+ 4 - 0
cbaselib/progs/createNormTrainingSet.cpp

@@ -47,7 +47,11 @@ using namespace std;
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
     char configfile [300];
     char objectclass_c [1024];

+ 4 - 0
cbaselib/progs/splitLabeledSetVector.cpp

@@ -88,7 +88,11 @@ void normalizeLabeledSetVector(const LabeledSetVector &teachSet,
  */
 int main(int argc, char **argv)
 {
+#ifndef __clang__
+#ifndef __llvm__
 	std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
 	Config conf(argc, argv);
 

+ 4 - 0
cbaselib/progs/statisticsTrainingSet.cpp

@@ -42,7 +42,11 @@ using namespace std;
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
     char configfile [300];
     char objectclass_c [1024];

+ 5 - 0
cbaselib/progs/testCachedExample.cpp

@@ -20,7 +20,12 @@ using namespace std;
 
 int main ( int argc, char **argv )
 {
+#ifndef __clang__
+#ifndef __llvm__
   std::set_terminate ( __gnu_cxx::__verbose_terminate_handler );
+#endif
+#endif
+
 
   char configfile [300];
 

+ 4 - 0
cbaselib/progs/testLabeledSet.cpp

@@ -26,7 +26,11 @@ using namespace std;
 */
 int main ( int argc, char **argv )
 {
+#ifndef __clang__
+#ifndef __llvm__
   std::set_terminate ( __gnu_cxx::__verbose_terminate_handler );
+#endif
+#endif
 
   char configfile [300];
 

+ 1 - 1
classifier/fpclassifier/logisticregression/libdepend.inc

@@ -1,4 +1,4 @@
-$(call PKG_DEPEND_EXT,OPENMP)
+# $(call PKG_DEPEND_EXT,OPENMP)
 $(call PKG_DEPEND_INT,vislearning/classifier/classifierbase)
 $(call PKG_DEPEND_INT,vislearning/features/fpfeatures)
 $(call PKG_DEPEND_INT,vislearning/optimization/mapestimation)

+ 1 - 1
classifier/fpclassifier/randomforest/libdepend.inc

@@ -1,4 +1,4 @@
-$(call PKG_DEPEND_EXT,OPENMP)
+# $(call PKG_DEPEND_EXT,OPENMP)
 $(call PKG_DEPEND_INT,vislearning/classifier/classifierbase)
 $(call PKG_DEPEND_INT,vislearning/features/fpfeatures)
 $(call PKG_DEPEND_INT,vislearning/optimization/mapestimation)

+ 1 - 1
classifier/kernelclassifier/libdepend.inc

@@ -1,5 +1,5 @@
 # $(call PKG_DEPEND_EXT,SVMLIGHT)
-$(call PKG_DEPEND_EXT,OPENMP)
+# $(call PKG_DEPEND_EXT,OPENMP)
 $(call PKG_DEPEND_INT,core/optimization)
 $(call PKG_DEPEND_INT,vislearning/cbaselib)
 $(call PKG_DEPEND_INT,vislearning/classifier/classifierbase)

+ 5 - 0
classifier/progs/toyExampleUnsupervisedGP.cpp

@@ -83,7 +83,12 @@ void markBoundary ( const NICE::Image & imgclassno, NICE::Image & mark )
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
+
 
     Config conf ( argc, argv );
     conf.store(cout);

+ 5 - 1
featureLearning/progs/testFeatureLearning.cpp

@@ -38,7 +38,11 @@ using namespace OBJREC;
 */
 int main( int argc, char **argv )
 {
+#ifndef __clang__
+#ifndef __llvm__
   std::set_terminate( __gnu_cxx::__verbose_terminate_handler );
+#endif
+#endif
 
   Config * conf = new Config ( argc, argv );
   
@@ -343,4 +347,4 @@ int main( int argc, char **argv )
     delete conf;
   
    return 0;
-}
+}

+ 1 - 1
features/localfeatures/libdepend.inc

@@ -1,5 +1,5 @@
 # $(call PKG_DEPEND_EXT,CUDASIFT)
-$(call PKG_DEPEND_EXT,OPENMP)
+# $(call PKG_DEPEND_EXT,OPENMP)
 $(call PKG_DEPEND_INT,core)
 $(call PKG_DEPEND_INT,vislearning/baselib)
 $(call PKG_DEPEND_INT,vislearning/image)

+ 5 - 1
features/localfeatures/progs/computeLocalFeatures.cpp

@@ -38,7 +38,11 @@ using namespace OBJREC;
 */
 int main( int argc, char **argv )
 {
+#ifndef __clang__
+#ifndef __llvm__
   std::set_terminate( __gnu_cxx::__verbose_terminate_handler );
+#endif
+#endif
 
   NICE::Config * conf = new NICE::Config ( argc, argv );
   
@@ -131,4 +135,4 @@ int main( int argc, char **argv )
 
   
    return 0;
-}
+}

+ 2 - 2
features/localfeatures/progs/sift-driver.cpp

@@ -18,7 +18,7 @@
 
 extern "C" {
 #include<getopt.h>
-#if defined (VL_MAC)
+#if defined(__clang__) || defined(__llvm__)
 #include<libgen.h>
 #else
 #include<string.h>
@@ -438,7 +438,7 @@ main(int argc, char** argv)
 	// the basename
 	if(outputFilenamePrefix.size() != 0) {
 	  outputFilename = outputFilenamePrefix + 
-	    std::string(basename(outputFilename.c_str())) ;
+	    std::string(basename((char*)outputFilename.c_str())) ;
 	}
 	
       // remove .pgm extension, add .key

+ 1 - 1
features/regionfeatures/libdepend.inc

@@ -1,4 +1,4 @@
 # $(call PKG_DEPEND_EXT,ICE)
-$(call PKG_DEPEND_EXT,OPENMP)
+# $(call PKG_DEPEND_EXT,OPENMP)
 $(call PKG_DEPEND_INT,segmentation)
 $(call PKG_DEPEND_INT,vislearning/features/fbase)

+ 5 - 0
math/cluster/progs/testKMeans.cpp

@@ -30,7 +30,12 @@ using namespace OBJREC;
 
 int main(int argc, char **argv)
 {
+#ifndef __clang__
+#ifndef __llvm__
 	std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
+
 	NICE::Image panel(200, 200);
 	NICE::Image overlay(panel.width(), panel.height());
 	panel.set(255);

+ 4 - 0
optimization/mapestimation/progs/testDirichlet.cpp

@@ -139,7 +139,11 @@ void simulation ( int samplesCount )
 
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
     char configfile [300];
 

+ 4 - 0
regression/gpregression/progs/testKernelOptimization.cpp

@@ -110,7 +110,11 @@ void testKernelDeriv ( KernelData *kernelData, ParameterizedKernel & kernelFunct
 */
 int main (int argc, char **argv)
 {   
+#ifndef __clang__
+#ifndef __llvm__
     std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+#endif
+#endif
 
     Config conf ( argc, argv );