Browse Source

fixed cmakelist unit testing cppunit

Johannes Ruehle 12 years ago
parent
commit
b305d9eb57
2 changed files with 27 additions and 3 deletions
  1. 2 0
      cmake/FindCppUnit.cmake
  2. 25 3
      readme.txt

+ 2 - 0
cmake/FindCppUnit.cmake

@@ -28,11 +28,13 @@ IF(WIN32)
 ELSE(WIN32)
   # On unix system, debug and release have the same name
   FIND_LIBRARY(CPPUNIT_LIBRARY cppunit
+               ${CPPUNIT_INCLUDE_DIR}/../lib64
                ${CPPUNIT_INCLUDE_DIR}/../lib
                /usr/local/lib
                /usr/lib)
   FIND_LIBRARY(CPPUNIT_DEBUG_LIBRARY cppunit
                ${CPPUNIT_INCLUDE_DIR}/../lib
+               ${CPPUNIT_INCLUDE_DIR}/../lib64
                /usr/local/lib
                /usr/lib)
 ENDIF(WIN32)

+ 25 - 3
readme.txt

@@ -112,10 +112,32 @@ NICE_USELIB_JPG
 NICE_USELIB_LIBMAGICK
 
 #eigene definiton zum builden der sub-test-ordners
-NICE_BUILD_TESTS	 http://www.comp.nus.edu.sg/~cs3215/tools/cppunitAll.html
-running tests: <build ordner>: cmake
-running tests mit schönen übersicht: <build ordner>: cmake --output-on-failure
 
+--------------- CPPUNIT verwenden ---------------------
+1) installation
+1-a) linux
+  if not already in path then:
+    download source from http://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/cppunit-1.12.1.tar.gz/download
+    unzip
+    create build_<pcname> dir
+    cd build_<pcname>
+    ../configure - -prefix=<path>/build_<pcname>/install
+    make 
+    make install
+    put <path>/build_<pcname>/install/include into system path variable, example in .bashrc:
+    PATH=/home/ruehle/libs/cppunit-1.12.1/build_sigma15/install/include/:$PATH
+
+1-b) Windows:
+  download http://www.comp.nus.edu.sg/~cs3215/tools/cppunitAll.html
+  build with visual studio
+  put path to generated lib in path variable (pointing to the */include path)
+2) enabling building cpp unit tests
+  NICE_BUILD_TESTS   
+  running tests: <build ordner>: cmake
+  make
+3) run the unit tests
+im <build ordner>: cmake --output-on-failure
+--------------------------------------------------------------
 
 NICE_BUILD_PROGS