readme.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. notes on porting NICE to WIN using CMAKE:
  2. -------
  3. 1. Never use GLOB_RECURSE. It's evil. E.g. if you add or remove source files, CMake has no way of knowing that it should be re-run. Just list all the files in your CMakeLists.txt (or, if you think the list is excessively long, create a file called e.g. files.cmake, put the list in there and INCLUDE it in the CMakeLists.txt file.
  4. 2. Never do in-source builds. CMake creates many, many files, and you don't want to delete them all individually for a clean build. And there's no way to implement a safe "make clean" (e.g. your build system might be running a custom utility which generates files CMake knows nothing about).
  5. fixing all these includes of template definitons:
  6. //#ifdef __GNUC__
  7. #include "core/vector/RowMatrixT.tcc"
  8. //#endif
  9. tcc are not cpps, they need to be included into the header file otherwise template usage will result in linking errors
  10. See, Inclusion model of Template classes: http://stackoverflow.com/questions/3705740/c-lnk2019-error-unresolved-external-symbol-template-classs-constructor-and
  11. ------------------------------------------
  12. porting core/basics/timer.h/cpp
  13. highly unix dependend
  14. better use 3rd party time functionality for now()
  15. better use
  16. boost::timer ??
  17. ---------------------------
  18. stringtools highly os dependented
  19. ->recursive dir scan with "ls -r" syntax!!
  20. use 3rd party lib like boost oder qt
  21. use boost regex for regex syntax in stringtools::regex bla
  22. -----------------------------------------------------------------------
  23. macro add_all_subdirs()
  24. set(_all_headers)
  25. set(_all_sources)
  26. set(_all_linkings)
  27. #ge
  28. foreach dir in subdirlist
  29. {
  30. add_directories( dir )
  31. #add header, sources, linkings from subdir to _all_* variables
  32. }
  33. endmacro
  34. set(NICE_CURR_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
  35. #### geile funktionen der OpenCV:
  36. ---aus OpenCVUtils.cmake:
  37. macro(ocv_convert_to_full_paths VAR) # convert list of paths to full paths
  38. macro(ocv_get_real_path VAR PATHSTR) # get absolute path with symlinks resolved
  39. macro(ocv_list_add_suffix LST SUFFIX) # add suffix to each item in the list
  40. macro(ocv_list_add_prefix LST PREFIX) # add prefix to each item in the list
  41. macro(ocv_list_unique __lst)# stable & safe duplicates removal macro
  42. OpenCVModule.cmake
  43. ocv_glob_modules(pathcurrdir) -->in modules
  44. in jedem untermodel, eg core
  45. ocv_add_module(modname)
  46. sets variable "the_module" => set(the_module opencv_${name})
  47. extra abhängikeitens über zweites argument in der funktion, eg. ocv_add_module(core ${ZLIB_Lbla})
  48. ocv_module_include_directories() ( auch mit zusatzincludes dann übergeben ${ZLib_include_Dir})
  49. ocv_glob_module_sources() holt cpps und hpp h aus unterordnern -- sources bilden
  50. ocv_create_module (binary build the module ->add_library, set_target etc
  51. #######
  52. defs to care about
  53. NICE_USELIB_CUDACHOLESKY
  54. NICE_USELIB_IPP
  55. NICE_USELIB_OPENMP
  56. #ifdef NICE_USELIB_MATIO
  57. NICE_USELIB_PNG
  58. NICE_USELIB_JPG
  59. NICE_USELIB_LIBMAGICK
  60. #eigene definiton zum builden der sub-test-ordners
  61. NICE_BUILD_TESTS
  62. NICE_BUILD_PROGS
  63. /wd"4244" /wd"4100" /wd"4127" /wd"4091"