浏览代码

cmake: added support for recursive source code scan; excluding matlab/* from build

Johannes Ruehle 11 年之前
父节点
当前提交
cd79ff3492
共有 5 个文件被更改,包括 11 次插入78 次删除
  1. 2 9
      CMakeLists.txt
  2. 0 43
      corefiles.cmake
  3. 9 0
      list_exclude_from_build.cmake
  4. 0 10
      progfiles.cmake
  5. 0 16
      testfiles.cmake

+ 2 - 9
CMakeLists.txt

@@ -4,21 +4,14 @@
 #library name (name is appended to "nice_" to form the target library name)
 set(the_library "gp-hik-core")
 
-#define variable nice_<libname>_HDR and nice_<libname>_SRC for library header and source files (don't include progs and test source files here)
-include( corefiles.cmake)
-
-#define variable nice_<libname>_PROGFILES_HDR and nice_<libname>_PROGFILES_SRC for program header and source files (don't include library and test source files here)
-include( progfiles.cmake)
-
-#define variable nice_<libname>_TESTFILES_HDR and nice_<libname>_TESTFILES_SRC for unit test header and source files (don't include library and progs source files here)
-include( testfiles.cmake)	
-
 #add linkage dependencies to other libraries here
 set("nice_${the_library}_LINKING_DEPENDENCIES" "nice_core")
 
 #####################################################
 message(STATUS "adding library ${the_library}")
 
+nice_get_source_files()
+
 nice_build_library()
 
 nice_add_progs()

+ 0 - 43
corefiles.cmake

@@ -1,43 +0,0 @@
-SET(nice_gp-hik-core_SRC
-./GMHIKernel.cpp
-./IKMNoise.cpp
-./kernels/IntersectionKernelFunction.cpp
-./FastMinKernel.cpp
-./GPHIKClassifier.cpp
-./FMKGPHyperparameterOptimization.cpp
-./Quantization.cpp
-./VectorSorter.cpp
-./algebra/LogDetApproxBaiAndGolub.cpp
-./IKMLinearCombination.cpp
-./GPLikelihoodApprox.cpp
-./ImplicitKernelMatrix.cpp
-./parameterizedFunctions/ParameterizedFunction.cpp
-)
-
-SET(nice_gp-hik-core_HDR
-./kernels/GeneralizedIntersectionKernelFunction.h
-./kernels/IntersectionKernelFunction.h
-./kernels/GenericKernelFunction.h
-./IKMNoise.h
-./FeatureMatrixT.h
-./GPHIKClassifier.h
-./ImplicitKernelMatrix.h
-./FMKGPHyperparameterOptimization.h
-./FastMinKernel.h
-./SortedVectorSparse.h
-./Quantization.h
-./tools.h
-./algebra/LogDetApproxBaiAndGolub.h
-./algebra/LogDetApprox.h
-./VectorSorter.h
-./GPLikelihoodApprox.h
-./GMHIKernel.h
-./IKMLinearCombination.h
-./parameterizedFunctions/ParameterizedFunction.h
-./parameterizedFunctions/PFExp.h
-./parameterizedFunctions/PFMKL.h
-./parameterizedFunctions/PFAbsExp.h
-./parameterizedFunctions/PFWeightedDim.h
-./OnlineLearnable.h
-)
-

+ 9 - 0
list_exclude_from_build.cmake

@@ -0,0 +1,9 @@
+SET(list_exclude_from_build_SRC
+matlab/ConverterMatlabToNICE.cpp
+matlab/ConverterMatlabToNICE.h
+matlab/ConverterNICEToMatlab.cpp
+matlab/ConverterNICEToMatlab.h
+matlab/GPHIKClassifierMex.cpp
+matlab/GPHIKRegressionMex.cpp	
+)
+

+ 0 - 10
progfiles.cmake

@@ -1,10 +0,0 @@
-# find . -name "*.cpp" -ipath "*/progs/*" > progfiles.cmake.t
-set(nice_segmentation_PROGFILES_SRC 
-./progs/toyExample.cpp
-./progs/completeEvaluationFastMinkernel.cpp
-./progs/classifyDatasetGPHIK.cpp
-./progs/toyExampleStoreRestore.cpp
-)
-
-set(nice_segmentation_PROGFILES_HDR
-)

+ 0 - 16
testfiles.cmake

@@ -1,16 +0,0 @@
-#generated by find . -name "*.cpp" -ipath "*/tests/*" > testfiles.cmake.t 
-SET(nice_gp-hik-core_TESTFILES_SRC 
-./tests/TestVectorSorter.cpp
-./tests/TestFeatureMatrixT.cpp
-./tests/TestFastHIK.cpp
-./tests/TestGPHIKOnlineLearnable.cpp
-./tests/TestGPHIKPersistent.cpp
-)
-
-SET(nice_gp-hik-core_TESTFILES_HDR
-./tests/TestFastHIK.h
-./tests/TestVectorSorter.h
-./tests/TestFeatureMatrixT.h
-./tests/TestGPHIKOnlineLearnable.h
-./tests/TestGPHIKPersistent.h
-)