From 6255859ebf19b38c864cd6dbaf2878e0116535a4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 27 May 2015 16:17:19 +0200 Subject: Fix cmake auto tests failing with cmake 2.8.11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After commit 3eca75de67b3fd2c890715b30c7899cebc096fe9 the use of _EXECUTABLE_COMPILE_FLAGS becomes mandatory for 2.8.11 or older. Therefore use it in test_use_modules - that's supposed to work with all cmake versions it seems - and bump test_interface to require 2.8.12. Change-Id: I7cfb6c6f1e8a97be916d372b9d9148490926693c Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Stephen Kelly --- tests/auto/cmake/CMakeLists.txt | 5 +---- tests/auto/cmake/test_interface/CMakeLists.txt | 2 +- tests/auto/cmake/test_use_modules_function/CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 87d8a802f3..b68aafe956 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -126,11 +126,8 @@ if (QT_WITH_ANGLE OR (NOT WIN32 AND NOT APPLE AND NOT NO_EGL)) endif() expect_pass(test_opengl_lib) -if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) - expect_pass(test_interface) -endif() - if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) + expect_pass(test_interface) expect_pass(test_interface_link_libraries) expect_pass(test_moc_macro_target) endif() diff --git a/tests/auto/cmake/test_interface/CMakeLists.txt b/tests/auto/cmake/test_interface/CMakeLists.txt index a8af92da63..bd3217a497 100644 --- a/tests/auto/cmake/test_interface/CMakeLists.txt +++ b/tests/auto/cmake/test_interface/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 2.8.12) project(test_interface) diff --git a/tests/auto/cmake/test_use_modules_function/CMakeLists.txt b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt index bfcdd9d1d7..be05c75054 100644 --- a/tests/auto/cmake/test_use_modules_function/CMakeLists.txt +++ b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt @@ -12,5 +12,7 @@ add_executable(three three.cpp) find_package(Qt5Core) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") + qt5_use_modules(two Test) qt5_use_modules(three Gui Test) -- cgit v1.2.3