on xenial help sign in
Add NO_TESTS cmake option to skip tests and therefore speed up builds

Approved by: Michael Zanetti, Albert Astals Cid

commitdaa5708873f3cf83b65f26f0ba0fba5b24d46de9 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateMon 2 Mar 2015, 12:10 (12 years ago) parent4a118207267c37
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#