2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

When installing .cpp files, don't scan them for #includes. It's pointless,

we don't compile.

Thanks to Franz Schnyder for the bug report.


[SVN r31756]
This commit is contained in:
Vladimir Prus
2005-11-23 16:10:41 +00:00
parent 3c86de280a
commit 6d4c855fff
3 changed files with 39 additions and 1 deletions

View File

@@ -770,6 +770,25 @@ class null-action : action
}
}
# Class which acts exactly like 'action', except that the sources
# are not scanned for dependencies.
class non-scanning-action : action
{
rule __init__ ( sources * : action-name + : property-set ? )
{
action.__init__ $(sources) : $(action-name) : $(property-set) ;
}
rule actualize-source-type ( sources * : property-set )
{
local result ;
for local i in $(sources)
{
result += [ $(i).actualize ] ;
}
return $(result) ;
}
}
# Creates a virtual target with approariate name and type from 'file'.
# If a target with that name in that project was already created, returns that already

View File

@@ -210,6 +210,24 @@ alias h : ..//dist2 ;
t.run_build_system(subdir="sub")
t.expect_addition("dist2/b/c.h")
# Test that when installing .cpp files, we don't scan
# include dependencies.
t.rm(".")
t.write("Jamroot", """
install dist : a.cpp ;
""")
t.write("a.cpp", """
#include "a.h"
""")
t.write("a.h", "")
t.run_build_system()
t.expect_addition("dist/a.cpp")
t.touch("a.h")
t.run_build_system()
t.expect_nothing("dist/a.cpp")

View File

@@ -250,7 +250,8 @@ rule copy-file ( project : source : properties )
local targets ;
local name = [ $(source).name ] ;
new-a = [ new action $(source) : common.copy : $(properties) ] ;
new-a = [
new non-scanning-action $(source) : common.copy : $(properties) ] ;
local source-root = [ $(properties).get <install-source-root> ] ;
if $(source-root)
{