Simplify logic for paths to CMake modules in tests.
authorStephen Kelly <stephen.kelly@kdab.com>
Fri, 29 Jun 2012 20:34:12 +0000 (22:34 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Jul 2012 23:08:13 +0000 (01:08 +0200)
Use a command line argument instead of an environment variable.

Change-Id: I518b21d1fb9567d182384885a308c76e108598d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs/features/ctest_testcase.prf

index 46c175e..f8283a5 100644 (file)
@@ -26,18 +26,14 @@ isEmpty(CMAKE_VERSION) {
         isEmpty(VERSION_OK) {
             message("cmake $$CMAKE_VERSION is too old for this test.")
         } else {
-            SET = set
-            equals(QMAKE_DIR_SEP, "/"):SET = export
-
             CMAKE_BUILD_TYPE = Debug
             CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
 
             BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
 
             check.commands = \
-                cd . && $$SET CMAKE_PREFIX_PATH=$$[QT_INSTALL_PREFIX] && \
                 $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
-                cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} && \
+                cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$[QT_INSTALL_PREFIX]\" && \
                 $(TESTRUNNER) ctest --output-on-failure
 
         }