Add first batch of configuration tests

Summary:
Configuration tests check whether all mandatory dependencies to build
swift are met. They can also be used to check optional dependencies, which
results in certain features to be enabled or disabled.
This first batch tests for mandatory libraries libpng, zlib and OpenGL.
If this is not tested and some libraries are missing, the developer will
be notified very late in the build.

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Subscribers: msutcliffe, jenkins

Differential Revision: https://dev.swift-project.org/D34
This commit is contained in:
Roland Winklmeier
2017-06-13 10:05:45 +02:00
committed by Mathew Sutcliffe
parent 045caddcc8
commit 7317ddd155
13 changed files with 163 additions and 52 deletions

View File

@@ -0,0 +1,56 @@
################################
# Path to external dependencies
################################
# If you want to manually set the external path, uncomment the following line
# EXTERNALSROOT = /path/to/externals
isEmpty(EXTERNALSROOT) {
EXTERNALSROOT = $$(SWIFT_EXTERNALS_DIR)
}
isEmpty(EXTERNALSROOT) {
EXTERNALSROOT = $$SourceRoot/externals
}
!exists("$$EXTERNALSROOT/common/include") {
error("Could not find externals in $${EXTERNALSROOT}. Please install them!")
}
################################
# Externals
################################
EXTERNALS_SPEC = $$basename(QMAKESPEC)
msvc {
clang_cl: EXTERNALS_SPEC = win32-msvc2015
win32-msvc2017: EXTERNALS_SPEC = win32-msvc2015
win32-msvc {
# From Qt 5.8.1 onwards, QMAKESPEC is win32-msvc without the version number
# see https://codereview.qt-project.org/#/c/162754/
lessThan(MSVC_VER, 14.0) | greaterThan(MSVC_VER, 15.0) {
error(This version of Visual Studio is not supported (MSVC_VER = $$MSVC_VER))
}
EXTERNALS_SPEC = win32-msvc2015
}
}
INCLUDEPATH *= $$EXTERNALSROOT/common/include
INCLUDEPATH *= $$EXTERNALSROOT/$$EXTERNALS_SPEC/include
INCLUDEPATH *= $$EXTERNALSROOT/common/include/crashpad
INCLUDEPATH *= $$EXTERNALSROOT/common/include/mini_chromium
equals(WORD_SIZE,64) {
EXTERNALS_BIN_DIR = $$EXTERNALSROOT/$$EXTERNALS_SPEC/bin64
EXTERNALS_LIB_DIR = $$EXTERNALSROOT/$$EXTERNALS_SPEC/lib64
}
equals(WORD_SIZE,32) {
EXTERNALS_BIN_DIR = $$EXTERNALSROOT/$$EXTERNALS_SPEC/bin32
EXTERNALS_LIB_DIR = $$EXTERNALSROOT/$$EXTERNALS_SPEC/lib32
}
LIBS *= -L$$EXTERNALS_LIB_DIR
macx: LIBS *= -F$$EXTERNALS_LIB_DIR
win32: LIBS *= -luser32
INCLUDEPATH *= $$EXTERNALDIR/common/include