Skip to content

Commit

Permalink
Escape semicolons on windows. Refs #6263
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Dec 4, 2012
1 parent a244d4a commit b4a522e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Code/Mantid/Build/CMake/FindPyUnitTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ macro ( PYUNITTEST_ADD_TEST_TWO _test_src_dir _testname_prefix )
set ( _module_dir_debug ${CMAKE_BINARY_DIR}/bin/Debug )
set ( _working_dir ${_module_dir} )
set ( _working_dir_debug ${_module_dir_debug} )
# Add test helper directory
set ( _module_dir "${_module_dir}:${TESTHELPER_SRC_DIR}" )
set ( _module_dir_debug "${_module_dir_debug}:${TESTHELPER_SRC_DIR}" )
# Add test helper directory (semi colons must be escaped)
set ( _module_dir "${_module_dir}\;${TESTHELPER_SRC_DIR}" )
set ( _module_dir_debug "${_module_dir_debug}\;${TESTHELPER_SRC_DIR}" )
else()
set ( _module_dir ${CMAKE_BINARY_DIR}/bin )
set ( _working_dir ${_module_dir} )
Expand All @@ -35,7 +35,7 @@ macro ( PYUNITTEST_ADD_TEST_TWO _test_src_dir _testname_prefix )
COMMAND ${PYTHON_EXECUTABLE_DEBUG} -B ${_test_src_dir}/${_filename} )
# Set the PYTHONPATH so that the built modules can be found
set_property ( TEST ${_pyunit_separate_name}_Debug
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir_debug}" APPEND )
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir_debug}" )
set_property ( TEST ${_pyunit_separate_name}_Debug
PROPERTY WORKING_DIRECTORY ${_working_dir_debug} )

Expand All @@ -44,15 +44,15 @@ macro ( PYUNITTEST_ADD_TEST_TWO _test_src_dir _testname_prefix )
COMMAND ${PYTHON_EXECUTABLE} -B ${_test_src_dir}/${_filename} )
# Set the PYTHONPATH so that the built modules can be found
set_property ( TEST ${_pyunit_separate_name}
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir}" APPEND )
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir}" )
set_property ( TEST ${_pyunit_separate_name}
PROPERTY WORKING_DIRECTORY ${_working_dir} )
else()
add_test ( NAME ${_pyunit_separate_name}
COMMAND ${PYTHON_EXECUTABLE} -B ${_test_src_dir}/${_filename} )
# Set the PYTHONPATH so that the built modules can be found
set_property ( TEST ${_pyunit_separate_name}
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir}" APPEND )
PROPERTY ENVIRONMENT "PYTHONPATH=${_module_dir}" )
set_property ( TEST ${_pyunit_separate_name}
PROPERTY WORKING_DIRECTORY ${_working_dir} )
endif()
Expand Down

0 comments on commit b4a522e

Please sign in to comment.