Browse Source

Fail when Qt4 is not found and BUILD_TESTS is set to true.

It's up to user to disable building of tests if Qt4 is not found,
instead of failing silently without user noticing it.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
5c70b482e7
  1. 7
      CMakeLists.txt

7
CMakeLists.txt

@ -10,11 +10,10 @@ if(BUILD_TESTS)
find_package(Qt4)
if(NOT QT4_FOUND)
message(WARNING "Qt4 is required for building unit tests. No tests will be build.")
set(BUILD_TESTS OFF)
else()
enable_testing()
message(FATAL_ERROR "Qt4, required for building unit tests, was not found. Set BUILD_TESTS to OFF to skip building them.")
endif()
enable_testing()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Magnum_SOURCE_DIR}/modules/")

Loading…
Cancel
Save