Files
qt-creator/tests/unit/unittest/clang_dependency.pri
Oswald Buddenhagen bb027e10a8 fix llvm libdir handling wrt RPATH, more or less properly
we must not add the llvm libdir if it's a system path. this was already
done in some places, but not in others.

while we're at it, re-shuffle some pre-existing conditionals to make
things consistent.

Task-number: QTCREATORBUG-20178
Change-Id: Ib7e5a81705494e4cf2f83a4782ecd0832b91e511
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-09 12:54:53 +00:00

27 lines
901 B
Plaintext

include(../../../src/shared/clang/clang_installation.pri)
!isEmpty(LLVM_VERSION) {
requires(!isEmpty(LIBCLANG_LIBS))
equals(LLVM_IS_COMPILED_WITH_RTTI, "NO") : message("LLVM needs to be compiled with RTTI!")
requires(equals(LLVM_IS_COMPILED_WITH_RTTI, "YES"))
DEFINES += CLANG_UNIT_TESTS
INCLUDEPATH += $$LLVM_INCLUDEPATH
win32 {
LIBS += -lVersion
# set run path for clang.dll dependency
bin_path = $$LLVM_BINDIR
bin_path ~= s,/,\\,g
# the below gets added to later by testcase.prf
check.commands = cd . & set PATH=$$bin_path;%PATH%& cmd /c
}
LIBS += $$LIBTOOLING_LIBS $$LIBCLANG_LIBS
!contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): QMAKE_RPATHDIR += $$LLVM_LIBDIR
LLVM_CXXFLAGS ~= s,-g\d?,
QMAKE_CXXFLAGS += $$LLVM_CXXFLAGS
DEFINES += CLANG_COMPILER_PATH=\"R\\\"xxx($$LLVM_BINDIR/clang)xxx\\\"\"
}