From 57b3aa60fdea75b87e2b256f178733bf8b2c747a Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Tue, 28 Mar 2017 01:04:46 +0200 Subject: [PATCH] tests: depend on OpenSSL in test.pri instead of each individual test. The murmur_pch.h file which most tests use -- either directly, or indrectly -- depends on being able to include OpenSSL headers. Some of our tests did not include(qmake/openssl.pri), which meant that those tests would fail to build in CONFIG(no-pch), such as on macOS. This commit works around that issue by depending on OpenSSL for all tests. --- src/tests/TestCrypt/TestCrypt.pro | 1 - src/tests/TestCryptographicHash/TestCryptographicHash.pro | 1 - .../TestCryptographicRandom/TestCryptographicRandom.pro | 1 - src/tests/TestPasswordGenerator/TestPasswordGenerator.pro | 1 - src/tests/test.pri | 6 ++++++ 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/TestCrypt/TestCrypt.pro b/src/tests/TestCrypt/TestCrypt.pro index 480fb8421..9f2ec26a3 100644 --- a/src/tests/TestCrypt/TestCrypt.pro +++ b/src/tests/TestCrypt/TestCrypt.pro @@ -4,7 +4,6 @@ # Mumble source tree or at . include(../test.pri) -include(../../../qmake/openssl.pri) QT *= network diff --git a/src/tests/TestCryptographicHash/TestCryptographicHash.pro b/src/tests/TestCryptographicHash/TestCryptographicHash.pro index 377a7e3af..5de0821f6 100644 --- a/src/tests/TestCryptographicHash/TestCryptographicHash.pro +++ b/src/tests/TestCryptographicHash/TestCryptographicHash.pro @@ -4,7 +4,6 @@ # Mumble source tree or at . include(../test.pri) -include(../../../qmake/openssl.pri) TARGET = TestCryptographicHash SOURCES = TestCryptographicHash.cpp CryptographicHash.cpp diff --git a/src/tests/TestCryptographicRandom/TestCryptographicRandom.pro b/src/tests/TestCryptographicRandom/TestCryptographicRandom.pro index fc397bf20..1e79baaf5 100644 --- a/src/tests/TestCryptographicRandom/TestCryptographicRandom.pro +++ b/src/tests/TestCryptographicRandom/TestCryptographicRandom.pro @@ -4,7 +4,6 @@ # Mumble source tree or at . include(../test.pri) -include(../../../qmake/openssl.pri) TARGET = TestCryptographicRandom SOURCES = TestCryptographicRandom.cpp CryptographicRandom.cpp arc4random_uniform.cpp diff --git a/src/tests/TestPasswordGenerator/TestPasswordGenerator.pro b/src/tests/TestPasswordGenerator/TestPasswordGenerator.pro index dc76d9181..650b5b0f5 100644 --- a/src/tests/TestPasswordGenerator/TestPasswordGenerator.pro +++ b/src/tests/TestPasswordGenerator/TestPasswordGenerator.pro @@ -4,7 +4,6 @@ # Mumble source tree or at . include(../test.pri) -include(../../../qmake/openssl.pri) TARGET = TestPasswordGenerator SOURCES = TestPasswordGenerator.cpp PasswordGenerator.cpp CryptographicRandom.cpp arc4random_uniform.cpp diff --git a/src/tests/test.pri b/src/tests/test.pri index 12ee52975..cff5cfa2f 100644 --- a/src/tests/test.pri +++ b/src/tests/test.pri @@ -26,3 +26,9 @@ LANGUAGE = C++ VPATH *= ../.. INCLUDEPATH *= ../.. ../../murmur ../../mumble + +# We have to depend on OpenSSL in all tests +# for no-pch builds to work. Our PCH headers +# include OpenSSL, and if the headers aren't +# in the include path, the build will break. +include(../../qmake/openssl.pri)