on xenial help sign in
Add NO_TESTS cmake option to skip tests and therefore speed up builds
commit7267c372bcda3d350a0c08ba211e28a34122aa0c authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateThu 19 Feb 2015, 08:04 (12 years ago) parent1e7da17
1 file changed+10−5
CMakeLists.txt+10−5
CMakeLists.txt+10−5
@@ -98,10 +98,6 @@ add_definitions(-DQT_NO_KEYWORDS)
9898# Save a few container detach and conversions
9999add_definitions(-DQT_STRICT_ITERATORS)
100100
101−# Tests
102−include(CTest)
103−enable_testing()
104−
105101# Autopilot tests
106102include(autopilot)
107103declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
@@ -121,7 +117,16 @@ add_subdirectory(libs)
121117add_subdirectory(src)
122118add_subdirectory(tools)
123119add_subdirectory(qml)
124−add_subdirectory(tests)
120+
121+# Tests
122+if (NOT NO_TESTS)
123+ include(CTest)
124+ enable_testing()
125+ add_subdirectory(tests)
126+else()
127+ message(STATUS "Tests disabled")
128+endif()
129+
125130add_subdirectory(plugins)
126131
127132#