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
05423608
Commit
05423608
authored
7 years ago
by
Martyn Gigg
Browse files
Options
Downloads
Patches
Plain Diff
Fix cmake dependency issues with python package targets.
Refs #20381
parent
b76b06c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/CMakeLists.txt
+13
-5
13 additions, 5 deletions
qt/CMakeLists.txt
qt/applications/workbench/CMakeLists.txt
+1
-1
1 addition, 1 deletion
qt/applications/workbench/CMakeLists.txt
with
14 additions
and
6 deletions
qt/CMakeLists.txt
+
13
−
5
View file @
05423608
...
...
@@ -4,16 +4,24 @@ find_package ( QScintillaQt4 REQUIRED )
include
(
QtTargetFunctions
)
# Function to create links to python packages in the source tree
# If the EXECUTABLE option is provided then it additional build rules are
# defined to ensure startup scripts are regenerated appropriately
function
(
add_python_package pkg_name
)
# Create a setup.py file
set
(
_setup_py
${
CMAKE_CURRENT_SOURCE_DIR
}
/setup.py
)
set
(
_egg_link_dir
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/
${
CMAKE_CFG_INTDIR
}
)
set
(
_egg_link
${
_egg_link_dir
}
/
${
pkg_name
}
.egg-link
)
set
(
_startup_script
${
_egg_link_dir
}
/
${
pkg_name
}
)
if
(
WIN32
)
set
(
_startup_script
${
_startup_script
}
.exe
)
if
(
ARGV0 EQUAL
"EXECUTABLE"
)
if
(
WIN32
)
set
(
_startup_script
${
_egg_link_dir
}
/
${
pkg_name
}
-script.pyw
)
set
(
_startup_exe
${
_egg_link_dir
}
/
${
pkg_name
}
.exe
)
else
()
set
(
_startup_script
)
set
(
_startup_exe
${
_egg_link_dir
}
/
${
pkg_name
}
)
endif
()
endif
()
add_custom_command
(
OUTPUT
${
_egg_link
}
${
_startup_script
}
set
(
_outputs
"
${
_egg_link
}
${
_startup_script
}
${
_startup_exe
}
"
)
add_custom_command
(
OUTPUT
${
_outputs
}
COMMAND
${
CMAKE_COMMAND
}
-E env PYTHONPATH=
${
_egg_link_dir
}
${
PYTHON_EXECUTABLE
}
${
_setup_py
}
develop
--install-dir
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/
${
CMAKE_CFG_INTDIR
}
...
...
@@ -22,7 +30,7 @@ function ( add_python_package pkg_name )
DEPENDS
${
_setup_py
}
)
add_custom_target
(
${
pkg_name
}
ALL
DEPENDS
${
_
egg_link_dir
}
/
${
pkg_name
}
${
_egg_link
}
DEPENDS
${
_
outputs
}
)
endfunction
()
...
...
This diff is collapsed.
Click to expand it.
qt/applications/workbench/CMakeLists.txt
+
1
−
1
View file @
05423608
# Creates egg link to binary output directory
add_python_package
(
workbench
)
add_python_package
(
workbench
EXECUTABLE
)
add_dependencies
(
workbench mantidqt
)
# ctest targets
...
...
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