Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
26788729
Commit
26788729
authored
Feb 22, 2009
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hash all include files in run_action to force recompilation if any header changes
parent
a962d139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/graph_tool/run_action/inline.py
src/graph_tool/run_action/inline.py
+7
-2
No files found.
src/graph_tool/run_action/inline.py
View file @
26788729
...
...
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
sys
,
string
,
hashlib
,
os
.
path
,
re
import
sys
,
string
,
hashlib
,
os
.
path
,
re
,
glob
from
..
import
core
from
..
import
libgraph_tool_core
import
numpy
...
...
@@ -39,6 +39,11 @@ cxxflags = libgraph_tool_core.mod_info().cxxflags + " -I%s" % inc_prefix
support_template
=
open
(
prefix
+
"/run_action/run_action_support.hh"
).
read
()
code_template
=
open
(
prefix
+
"/run_action/run_action_template.hh"
).
read
()
# hash all the headers to force recompilation if code changes
headers_hash
=
""
for
inc
in
glob
.
glob
(
inc_prefix
+
"/*"
):
headers_hash
=
hashlib
.
md5
(
headers_hash
+
open
(
inc
).
read
()).
hexdigest
()
# property map types
props
=
"""
typedef GraphInterface::vertex_index_map_t vertex_index_t;
...
...
@@ -181,7 +186,7 @@ def inline(code, arg_names=[], local_dict=None,
extra_compile_args
+
\
extra_objects
+
\
extra_link_args
)
+
\
core
.
__version__
).
hexdigest
()
headers_hash
+
core
.
__version__
).
hexdigest
()
code
+=
"
\n
// support code hash: "
+
support_hash
inline_code
=
string
.
Template
(
globals
()[
"code_template"
]).
\
substitute
(
var_defs
=
arg_def
,
var_extract
=
arg_conv
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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