Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
a0c17e60
Commit
a0c17e60
authored
10 years ago
by
Gigg, Martyn Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Update ctest doc tests for multi-config generators.
Refs #9639
parent
a5544f6b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Build/CMake/FindSphinx.cmake
+36
-8
36 additions, 8 deletions
Code/Mantid/Build/CMake/FindSphinx.cmake
Code/Mantid/docs/runsphinx.py.in
+5
-1
5 additions, 1 deletion
Code/Mantid/docs/runsphinx.py.in
with
41 additions
and
9 deletions
Code/Mantid/Build/CMake/FindSphinx.cmake
+
36
−
8
View file @
a0c17e60
...
...
@@ -30,28 +30,56 @@ macro ( SPHINX_ADD_TEST _testname_prefix _doctest_runner_script )
# that file.
# Property for the module directory
if
(
MSVC
)
if
(
MSVC OR CMAKE_GENERATOR STREQUAL Xcode
)
# both have separate configs
set
(
_multiconfig TRUE
)
set
(
_module_dir
${
CMAKE_BINARY_DIR
}
/bin/Release
)
set
(
_module_dir_debug
${
CMAKE_BINARY_DIR
}
/bin/Debug
)
set
(
_working_dir
${
_module_dir
}
)
set
(
_working_dir_debug
${
_module_dir_debug
}
)
if
(
MSVC
)
set
(
_debug_exe
${
PYTHON_EXECUTABLE_DEBUG
}
)
set
(
_release_exe
${
PYTHON_EXECUTABLE
}
)
else
()
set
(
_debug_exe
${
PYTHON_EXECUTABLE
}
)
set
(
_release_exe
${
PYTHON_EXECUTABLE
}
)
endif
()
else
()
set
(
_module_dir
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
_working_dir
${
_module_dir
}
)
set
(
_debug_exe
${
PYTHON_EXECUTABLE
}
)
set
(
_release_exe
${
PYTHON_EXECUTABLE
}
)
endif
()
foreach
(
part
${
ARGN
}
)
set
(
_fullpath
${
SPHINX_SRC_DIR
}
/
${
part
}
)
get_filename_component
(
_filename
${
part
}
NAME
)
get_filename_component
(
_docname
${
part
}
NAME_WE
)
set
(
_testname
"
${
_testname_prefix
}
_
${
_docname
}
"
)
add_test
(
NAME
${
_testname
}
COMMAND
${
PYTHON_EXECUTABLE
}
${
_doctest_runner_script
}
)
set_property
(
TEST
${
_testname
}
PROPERTY
ENVIRONMENT
"SPHINX_SRC_FILE=
${
_fullpath
}
"
)
set_property
(
TEST
${
_testname
}
PROPERTY
WORKING_DIRECTORY
${
_working_dir
}
)
if
(
_multiconfig
)
# Debug builds need to call the debug executable
add_test
(
NAME
${
_testname
}
_Debug CONFIGURATIONS Debug
COMMAND
${
_debug_exe
}
${
_doctest_runner_script
}
)
set_property
(
TEST
${
_testname
}
_Debug PROPERTY
ENVIRONMENT
"SPHINX_SRC_FILE=
${
_fullpath
}
;RUNTIME_CONFIG=Debug"
)
set_property
(
TEST
${
_testname
}
_Debug PROPERTY
WORKING_DIRECTORY
${
_working_dir
}
)
# Release
add_test
(
NAME
${
_testname
}
CONFIGURATIONS Release
COMMAND
${
_release_exe
}
${
_doctest_runner_script
}
)
set_property
(
TEST
${
_testname
}
PROPERTY
ENVIRONMENT
"SPHINX_SRC_FILE=
${
_fullpath
}
;RUNTIME_CONFIG=Release"
)
set_property
(
TEST
${
_testname
}
PROPERTY
WORKING_DIRECTORY
${
_working_dir
}
)
else
()
add_test
(
NAME
${
_testname
}
COMMAND
${
_release_exe
}
${
_doctest_runner_script
}
)
set_property
(
TEST
${
_testname
}
PROPERTY
ENVIRONMENT
"SPHINX_SRC_FILE=
${
_fullpath
}
"
)
set_property
(
TEST
${
_testname
}
PROPERTY
WORKING_DIRECTORY
${
_working_dir
}
)
endif
()
endforeach
()
endmacro
()
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/runsphinx.py.in
+
5
−
1
View file @
a0c17e60
...
...
@@ -7,7 +7,11 @@ import sys
def main():
# Update path to find mantid
sys.path.insert(0, "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
package_dir = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"
runtime_config = os.environ.get("RUNTIME_CONFIG", "") # for visual studio and xcode
if runtime_config != "":
package_dir = os.path.join(package_dir, runtime_config)
sys.path.insert(0, package_dir)
# Update environment with screenshots path
screenshots_dir = "@SCREENSHOTS_DIR@"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment