aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-03 11:52:46 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-03 11:52:46 +0200
commitd6791e8f3d365f1cffdb4a64ed5b2dd3e897ad38 (patch)
treeb6106fed3bba3973fa747e527c571b8371f47b92
parent5a52f2833f25fe6623a0e92d438afd5a86856f13 (diff)
Fixed annoying CMake - Qt warning.
-rw-r--r--demos/CMakeLists.txt16
-rw-r--r--test/CMakeLists.txt7
2 files changed, 13 insertions, 10 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index ce25125ec..b0d2eddbb 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -2,10 +2,12 @@ project(EigenDemos)
add_custom_target(demos)
-find_package(Qt4)
-if(QT4_FOUND)
- add_subdirectory(mandelbrot)
- add_subdirectory(opengl)
-else(QT4_FOUND)
- message(STATUS "Qt4 not found, so disabling the mandelbrot and opengl demos")
-endif(QT4_FOUND)
+if(NOT EIGEN_TEST_NOQT)
+ find_package(Qt4)
+ if(QT4_FOUND)
+ add_subdirectory(mandelbrot)
+ add_subdirectory(opengl)
+ else(QT4_FOUND)
+ message(STATUS "Qt4 not found, so disabling the mandelbrot and opengl demos")
+ endif(QT4_FOUND)
+endif()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 75e4e116d..7af5b531f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -19,14 +19,15 @@ endif(GSL_FOUND)
option(EIGEN_TEST_NOQT "Disable Qt support in unit tests" OFF)
if(NOT EIGEN_TEST_NOQT)
+ message("----------------> find qt")
find_package(Qt4)
endif(NOT EIGEN_TEST_NOQT)
-if(QT4_FOUND)
+if(EIGEN_TEST_NOQT AND QT4_FOUND)
include(${QT_USE_FILE})
ei_add_property(EIGEN_TESTED_BACKENDS "Qt4 support, ")
-else(QT4_FOUND)
+else()
ei_add_property(EIGEN_MISSING_BACKENDS "Qt4 support, ")
-endif(QT4_FOUND)
+endif()
if(TEST_LIB)
add_definitions("-DEIGEN_EXTERN_INSTANTIATIONS=1")