forked from qt-creator/qt-creator
CMake Build: Add Qt and clang in PATH variable for Windows tests
Windows doesn't have RPATH support, and Qt and clang directories need to be set into PATH environment variable for tests to be able to run. On my work machine I had the directories set into the global PATH environment. Change-Id: I91e0adc5999479e7dcf3cf0a734ed31e6edc402f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -486,6 +486,10 @@ function(fix_test_environment test_name)
|
||||
list(APPEND env_path $ENV{PATH})
|
||||
list(APPEND env_path ${CMAKE_BINARY_DIR}/${IDE_PLUGIN_PATH})
|
||||
list(APPEND env_path ${CMAKE_BINARY_DIR}/${IDE_BIN_PATH})
|
||||
list(APPEND env_path $<TARGET_FILE_DIR:Qt5::Test>)
|
||||
if (TARGET libclang)
|
||||
list(APPEND env_path $<TARGET_FILE_DIR:libclang>)
|
||||
endif()
|
||||
|
||||
string(REPLACE "/" "\\" env_path "${env_path}")
|
||||
string(REPLACE ";" "\\;" env_path "${env_path}")
|
||||
|
Reference in New Issue
Block a user