Comment 4 for bug 619045

Revision history for this message
Jari Hautio (jarih) wrote :

It's easiest just to change default value of BUILD_UNIT_TESTS to false, and trunk wont build tests nor require unit test framework unless tests are requested. As this value is cached, changing default value affects only when running cmake to new build directory.

For other tests approach that is used in src/scripting/CMakeLists.txt is propably fine: test sub directory is only included if BUILD_UNIT_TESTS is true.

=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2010-09-03 21:13:43 +0000
+++ CMakeLists.txt 2010-09-16 19:18:51 +0000
@@ -106,7 +106,7 @@
 set (BUILD_SHARED_LIBS OFF)

 # Unit tests add dependency to unit_test_framework and are therefore optional.
-set (BUILD_UNIT_TESTS TRUE CACHE BOOL "Build unit tests (requires boost unit test framework)")
+set (BUILD_UNIT_TESTS FALSE CACHE BOOL "Build unit tests (requires boost unit test framework)")

 if (BUILD_UNIT_TESTS)
   # we only include Boost Headers to the main executable, no libraries