소스 검색

cmake commit

Johannes Ruehle 12 년 전
부모
커밋
02637874a2
3개의 변경된 파일28개의 추가작업 그리고 54개의 파일을 삭제
  1. 5 31
      CMakeLists.txt
  2. 22 22
      corefiles.cmake
  3. 1 1
      progfiles.cmake

+ 5 - 31
CMakeLists.txt

@@ -16,42 +16,16 @@ include( testfiles.cmake)
 #add linkage dependencies to other libraries here
 #add linkage dependencies to other libraries here
 set("nice_${the_library}_LINKING_DEPENDENCIES" "nice_core")
 set("nice_${the_library}_LINKING_DEPENDENCIES" "nice_core")
 
 
+
+add_definitions("-DUSE_64_BIT_PTR_CAST") #for mrf compiliation, see mrf/mrfmin/graph.h
 #####################################################
 #####################################################
 message(STATUS "adding library ${the_library}")
 message(STATUS "adding library ${the_library}")
 
 
-ADD_LIBRARY("nice_${the_library}" ${NICE_BUILD_LIBS_STATIC_SHARED} ${nice_${the_library}_HDR} ${nice_${the_library}_SRC})
-TARGET_LINK_LIBRARIES("nice_${the_library}" "${nice_${the_library}_LINKING_DEPENDENCIES}" ${Boost_LIBRARIES} ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${QT_LIBRARIES})
-SET_PROPERTY(TARGET "nice_${the_library}" PROPERTY FOLDER "library")
-INSTALL(TARGETS "nice_${the_library}" DESTINATION lib)
-
-
-if(BUILD_CORE_PROGS)
-  message(STATUS "building progs:")
-  foreach(__progcpp ${nice_${the_library}_PROGFILES_SRC})
-    get_filename_component(__progname ${__progcpp} NAME_WE )
-    message(STATUS "progname: ${__progname} ${__progcpp}")
-    ADD_EXECUTABLE( ${__progname} ${__progcpp})
-    TARGET_LINK_LIBRARIES(${__progname} "nice_${the_library}")
-    INSTALL(TARGETS ${__progname} DESTINATION bin)
-	SET_PROPERTY(TARGET ${__progname} PROPERTY FOLDER "programs")
-  endforeach()
-endif()
+nice_build_library()
 
 
-if(BUILD_CORE_TESTS)
-  INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR})
-  message(STATUS "building tests:")
-  foreach(__testcpp ${nice_${the_library}_TESTFILES_SRC})
-    get_filename_component(__testname ${__testcpp} NAME_WE )
-    message(STATUS "unittest: ${__testname} ${__testcpp}")
-    
-    ADD_EXECUTABLE( ${__testname} ../templates/cppUnitTestRunner.cpp ${__testcpp})
-    TARGET_LINK_LIBRARIES(${__testname} "nice_${the_library}" ${CPPUNIT_LIBRARIES} )
+nice_add_progs()
 
 
-    INSTALL(TARGETS ${__testname} DESTINATION tests)
-	SET_PROPERTY(TARGET ${__testname} PROPERTY FOLDER "unittests")
-	ADD_TEST(${__testname} ${__testname})
-  endforeach()
-endif()
+nice_add_unittests()
 
 
 #####
 #####
  set(the_module "nice_${the_library}")
  set(the_module "nice_${the_library}")

+ 22 - 22
corefiles.cmake

@@ -1,16 +1,16 @@
 SET(nice_vislearning_SRC
 SET(nice_vislearning_SRC
 ./image/GenericImageTools.cpp
 ./image/GenericImageTools.cpp
 ./image/ImagePyramid.cpp
 ./image/ImagePyramid.cpp
-# ./mrf/mrfmin/regions-maxprod.cpp
-# ./mrf/mrfmin/MaxProdBP.cpp
-# ./mrf/mrfmin/mrf.cpp
-# ./mrf/mrfmin/LinkedBlockList.cpp
-# ./mrf/mrfmin/TRW-S.cpp
-# ./mrf/mrfmin/ICM.cpp
-# ./mrf/mrfmin/maxflow.cpp
-# ./mrf/mrfmin/GCoptimization.cpp
-# ./mrf/mrfmin/BP-S.cpp
-# ./mrf/mrfmin/graph.cpp
+./mrf/mrfmin/regions-maxprod.cpp
+./mrf/mrfmin/MaxProdBP.cpp
+./mrf/mrfmin/mrf.cpp
+./mrf/mrfmin/LinkedBlockList.cpp
+./mrf/mrfmin/TRW-S.cpp
+./mrf/mrfmin/ICM.cpp
+./mrf/mrfmin/maxflow.cpp
+./mrf/mrfmin/GCoptimization.cpp
+./mrf/mrfmin/BP-S.cpp
+./mrf/mrfmin/graph.cpp
 ./baselib/ColorSpace.cpp
 ./baselib/ColorSpace.cpp
 ./baselib/ICETools.cpp
 ./baselib/ICETools.cpp
 ./baselib/Preprocess.cpp
 ./baselib/Preprocess.cpp
@@ -213,18 +213,18 @@ SET(nice_vislearning_SRC
 SET(nice_vislearning_HDR
 SET(nice_vislearning_HDR
 ./image/ImagePyramid.h
 ./image/ImagePyramid.h
 ./image/GenericImageTools.h
 ./image/GenericImageTools.h
-# ./mrf/mrfmin/BP-S.h
-# ./mrf/mrfmin/block.h
-# ./mrf/mrfmin/energy.h
-# ./mrf/mrfmin/TRW-S.h
-# ./mrf/mrfmin/ICM.h
-# ./mrf/mrfmin/MaxProdBP.h
-# ./mrf/mrfmin/GCoptimization.h
-# ./mrf/mrfmin/typeTruncatedQuadratic2D.h
-# ./mrf/mrfmin/LinkedBlockList.h
-# ./mrf/mrfmin/regions-new.h
-# ./mrf/mrfmin/graph.h
-# ./mrf/mrfmin/mrf.h
+./mrf/mrfmin/BP-S.h
+./mrf/mrfmin/block.h
+./mrf/mrfmin/energy.h
+./mrf/mrfmin/TRW-S.h
+./mrf/mrfmin/ICM.h
+./mrf/mrfmin/MaxProdBP.h
+./mrf/mrfmin/GCoptimization.h
+./mrf/mrfmin/typeTruncatedQuadratic2D.h
+./mrf/mrfmin/LinkedBlockList.h
+./mrf/mrfmin/regions-new.h
+./mrf/mrfmin/graph.h
+./mrf/mrfmin/mrf.h
 ./baselib/doxygenDescription.h
 ./baselib/doxygenDescription.h
 ./baselib/Gnuplot.h
 ./baselib/Gnuplot.h
 ./baselib/cmdline.h
 ./baselib/cmdline.h

+ 1 - 1
progfiles.cmake

@@ -1,6 +1,6 @@
 # find . -name "*.cpp" -ipath "*/progs/*" > progfiles.cmake.t
 # find . -name "*.cpp" -ipath "*/progs/*" > progfiles.cmake.t
 set(nice_vislearning_PROGFILES_SRC 
 set(nice_vislearning_PROGFILES_SRC 
-#./mrf/mrfmin/progs/example.cpp
+./mrf/mrfmin/progs/example.cpp
 ./progs/testImageNetBinary.cpp
 ./progs/testImageNetBinary.cpp
 ./progs/testImageNetBinaryBruteForce.cpp
 ./progs/testImageNetBinaryBruteForce.cpp
 ./progs/testImageNetBinaryGPBaseline.cpp
 ./progs/testImageNetBinaryGPBaseline.cpp