Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorRuben D <rubend@tutanota.com>2017-12-30 19:11:11 +0300
committerRuben D <rubend@tutanota.com>2017-12-30 19:11:11 +0300
commit80ba5fc97dc4e328e1303bc5fd7cd3e337fb0585 (patch)
tree6214d4ee663f19273f27dd6b73581b78b8367288 /cmake
parent28919a57a4ab98e13465e8c31158fecc6239a307 (diff)
Fix PYTHONPATH pass-through
This makes sure that any pythonpath on the user's environment is also used for these tests. The same fix as here: https://github.com/Ultimaker/Uranium/commit/31106cd60af774d8cd0ed24e18615a6491212b34
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CuraTests.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake
index f93313e39a..ffe4616bf3 100644
--- a/cmake/CuraTests.cmake
+++ b/cmake/CuraTests.cmake
@@ -24,8 +24,10 @@ function(cura_add_test)
if(WIN32)
string(REPLACE "|" "\\;" _PYTHONPATH ${_PYTHONPATH})
+ set(_PYTHONPATH "${_PYTHONPATH}\\;$ENV{PYTHONPATH}")
else()
string(REPLACE "|" ":" _PYTHONPATH ${_PYTHONPATH})
+ set(_PYTHONPATH "${_PYTHONPATH}:$ENV{PYTHONPATH}")
endif()
get_test_property(${_NAME} ENVIRONMENT test_exists) #Find out if the test exists by getting a property from it that always exists (such as ENVIRONMENT because we set that ourselves).