diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2017-03-15 21:02:37 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2017-03-15 21:02:37 +0300 |
commit | 0c215331ee78d3afda624241317ff75f3bee9d2e (patch) | |
tree | 0948e26f2fba5ef55877868313161b2d2013c1c4 /cmake | |
parent | 04548d2862f1a795b0fc0b2addd7c92488f46a08 (diff) |
PYTHONPATH uses a platform dependent path separator after all
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CuraTests.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake index cf9fa4ba68..604f93d7e3 100644 --- a/cmake/CuraTests.cmake +++ b/cmake/CuraTests.cmake @@ -30,13 +30,19 @@ function(cura_add_test) set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT PYTHONPATH=${_PYTHONPATH}) endfunction() -cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}:${URANIUM_DIR}") +if(WIN32) + set(_path_sep ";") +else() + set(_path_sep ":") +endif() + +cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}${_path_sep}${URANIUM_DIR}") file(GLOB_RECURSE _plugins plugins/*/__init__.py) foreach(_plugin ${_plugins}) get_filename_component(_plugin_directory ${_plugin} DIRECTORY) if(EXISTS ${_plugin_directory}/tests) get_filename_component(_plugin_name ${_plugin_directory} NAME) - cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}:${CMAKE_SOURCE_DIR}:${URANIUM_DIR}") + cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}${_path_sep}${CMAKE_SOURCE_DIR}${_path_sep}${URANIUM_DIR}") endif() endforeach() |