Fix passing arguments to the Python test command to use 'env' builtin
CMake command, in order to fix compatibility with Windows.
Differential Revision: https://reviews.llvm.org/D53151
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344288
91177308-0d34-0410-b5e6-
96231b3b80d8
# Test target to run Python test suite from main build.
add_custom_target(check-clang-python
- COMMAND CLANG_LIBRARY_PATH=$<TARGET_FILE_DIR:libclang> ${PYTHON_EXECUTABLE} -m unittest discover
+ COMMAND ${CMAKE_COMMAND} -E env
+ CLANG_LIBRARY_PATH=$<TARGET_FILE_DIR:libclang>
+ ${PYTHON_EXECUTABLE} -m unittest discover
DEPENDS libclang
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)