README 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. This is the "money example" from the Check tutorial.
  2. This demonstrates using Check along with one of two build systems:
  3. autotools and CMake.
  4. ========================
  5. Autotools:
  6. You need the following programs installed on your system:
  7. -- Autoconf 2.59
  8. -- Automake 1.9.6
  9. -- Libtool 1.5.22
  10. -- Check 0.9.9
  11. Somewhat earlier versions of these programs might work.
  12. Then, do as follows:
  13. $ autoreconf --install
  14. $ ./configure
  15. $ make
  16. $ make check
  17. Don't do "make install" unless you want to install the money example.
  18. money.c and money.h are built as a library. src/main.c:main() is a
  19. client of libmoney.la, just as tests/check_money.c:main() is a client
  20. of libmoney.la
  21. To use the autotools example in another project, start with the following
  22. files:
  23. example
  24. |--- configure.ac
  25. |--- Makefile.am
  26. |--- src
  27. | |--- Makefile.am
  28. |--- tests
  29. |--- Makefile.am
  30. Please send bug reports to check-devel AT lists.sourceforge.net.
  31. ========================
  32. CMake:
  33. You need the following programs installed on your system:
  34. -- CMake 2.8
  35. -- Check 0.9.9
  36. -- (pkg-config 0.26 is optional)
  37. Somewhat earlier versions of these programs might work.
  38. NOTE: If pkg-config is not installed on the system, and MSVC is being used,
  39. the install location of Check must be inserted manually into the
  40. tests/CMakeLists.txt file, by setting the variable CHECK_INSTALL_DIR
  41. to the install location. Look at the tests/CMakeLists.txt file for
  42. a commented out example.
  43. Then, do as follows for a Unix-compatible shell:
  44. $ cmake .
  45. $ make
  46. $ make test
  47. or the following for MSVC:
  48. $ cmake -G "NMake Makefiles" .
  49. $ nmake
  50. $ nmake test
  51. Don't do "make install" or "nmake install" unless you want to install the money example.
  52. money.c and money.h are built as a library. src/main.c:main() is a
  53. client of libmoney.la, just as tests/check_money.c:main() is a client
  54. of libmoney.la
  55. To use the CMake example in another project, start with the following files:
  56. example
  57. |--- CMakeFiles.txt
  58. |--- cmake
  59. | |--- config.h.in
  60. | |--- FindCheck.cmake
  61. |--- src
  62. | |--- CMakeFiles.txt
  63. |--- tests
  64. |--- CMakeFiles.txt
  65. Please send bug reports to check-devel AT lists.sourceforge.net.