Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
05ae26bf
Unverified
Commit
05ae26bf
authored
Mar 23, 2020
by
Gigg, Martyn Anthony
Committed by
GitHub
Mar 23, 2020
Browse files
Merge pull request #28374 from mantidproject/Make_python_targets_runnable_msvc
Make python targets runnable on MSVC IDE
parents
8d41a1db
728c361f
Changes
4
Hide whitespace changes
Inline
Side-by-side
buildconfig/CMake/Bootstrap.cmake
View file @
05ae26bf
...
...
@@ -113,6 +113,7 @@ if(MSVC)
"The location of the pythonw executable. This suppresses the new terminal window on startup"
FORCE
)
set
(
THIRD_PARTY_BIN
"
${
THIRD_PARTY_DIR
}
/bin;
${
THIRD_PARTY_DIR
}
/lib/qt4/bin;
${
THIRD_PARTY_DIR
}
/lib/qt5/bin;
${
MSVC_PYTHON_EXECUTABLE_DIR
}
"
)
...
...
buildconfig/CMake/MSVCSetup.cmake
View file @
05ae26bf
...
...
@@ -128,18 +128,23 @@ else ()
set
(
PARAVIEW_PYTHON_PATHS
""
)
endif
()
set
(
MSVC_BIN_DIR
${
PROJECT_BINARY_DIR
}
/bin/$<CONFIG>
)
configure_file
(
${
PACKAGING_DIR
}
/mantidpython.bat.in
${
PROJECT_BINARY_DIR
}
/mantidpython.bat.in @ONLY
)
# place it in the appropriate directory
file
(
GENERATE
OUTPUT
${
PROJECT
_BIN
ARY
_DIR
}
/
bin/$<$<CONFIG:Release>:Release>$<$<CONFIG:Debug>:Debug>/
mantidpython.bat
${
MSVC
_BIN_DIR
}
/mantidpython.bat
INPUT
${
PROJECT_BINARY_DIR
}
/mantidpython.bat.in
)
# install version
set
(
MANTIDPYTHON_PREAMBLE
"set PYTHONHOME=%_BIN_DIR%
\n
set PATH=%_BIN_DIR%;%_BIN_DIR%
\\
..
\\
plugins;%_BIN_DIR%
\\
..
\\
PVPlugins;%PATH%"
)
# Semi-colon gen exp prevents future generators converting to CMake lists
set
(
MSVC_IDE_ENV
"PYTHONPATH=
${
MSVC_BIN_DIR
}
$<SEMICOLON>PYTHONHOME=
${
MSVC_PYTHON_EXECUTABLE_DIR
}
"
)
if
(
MAKE_VATES
)
set
(
PV_LIBS
"%_BIN_DIR%
\\
..
\\
lib
\\
paraview-
${
PARAVIEW_VERSION_MAJOR
}
.
${
PARAVIEW_VERSION_MINOR
}
"
)
set
(
PARAVIEW_PYTHON_PATHS
";
${
PV_LIBS
}
\\
site-packages;
${
PV_LIBS
}
\\
site-packages
\\
vtk"
)
...
...
@@ -150,6 +155,17 @@ endif ()
configure_file
(
${
PACKAGING_DIR
}
/mantidpython.bat.in
${
PROJECT_BINARY_DIR
}
/mantidpython.bat.install @ONLY
)
##########################################################################
# Custom targets to fix-up and run Python entry point code
##########################################################################
add_custom_target
(
SystemTests
)
add_dependencies
(
SystemTests Framework StandardTestData SystemTestData
)
set_target_properties
(
SystemTests PROPERTIES
VS_DEBUGGER_COMMAND
"
${
PYTHON_EXECUTABLE
}
"
VS_DEBUGGER_COMMAND_ARGUMENTS
"
${
CMAKE_SOURCE_DIR
}
/Testing/SystemTests/scripts/runSystemTests.py --executable
\"
${
MSVC_BIN_DIR
}
/mantidpython.bat
\"
--exec-args
\"
--classic
\"
"
VS_DEBUGGER_ENVIRONMENT
"
${
MSVC_IDE_ENV
}
"
)
###########################################################################
# (Fake) installation variables to keep windows sweet
###########################################################################
...
...
dev-docs/source/SystemTests.rst
View file @
05ae26bf
...
...
@@ -201,6 +201,22 @@ fixed when running CMake, e.g.
cd build
systemtest
Selecting Tests to Run From IDE
-------------------------------
System tests can be ran from the MSVC IDE using the ``SystemTests`` target,
which behaves in a similar way to unit test targets. One key advantage is
that it allows you to start Mantid in a debug environment rather than attach
to one midway through.
To select an individual test, or range of tests, go to the ``SystemTests``
properties, go to ```Command Arguments``` and append flags as appropriate.
For example, adding ``-R ISIS`` will run any tests which match the regular
expression ``ISIS``.
Selecting Tests To Run
----------------------
...
...
@@ -217,6 +233,7 @@ e.g.
would run all of the tests whose name contains SNS.
Running the tests on multiple cores
-----------------------------------
...
...
qt/applications/workbench/CMakeLists.txt
View file @
05ae26bf
...
...
@@ -12,6 +12,12 @@ add_python_package(workbench
INSTALL_BIN_DIR
"
${
WORKBENCH_BIN_DIR
}
"
)
set_target_properties
(
workbench PROPERTIES
VS_DEBUGGER_COMMAND $<$<BOOL:
${
WIN32
}
>:
${
PYTHON_EXECUTABLE
}
>
VS_DEBUGGER_COMMAND_ARGUMENTS $<$<BOOL:
${
WIN32
}
>:
${
MSVC_BIN_DIR
}
/workbench-script.pyw>
VS_DEBUGGER_ENVIRONMENT $<$<BOOL:
${
WIN32
}
>:
${
MSVC_IDE_ENV
}
>
)
set
(
_images_qrc_file
${
CMAKE_CURRENT_LIST_DIR
}
/resources.qrc
)
if
(
WIN32
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment