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

Added a better Boost Build diagnostic error message when attempting to reference a target using an explicitly specified project id but without a leading slash ('/') character, e.g. as in:

use-project xxx : ../external/some-project ;
  exe a : xxx//some-obj ;

as opposed to:

  use-project xxx : ../external/some-project ;
  exe a : /xxx//some-obj ;

[SVN r79931]
This commit is contained in:
Jurko Gospodnetić
2012-08-08 17:31:08 +00:00
parent 843ea4770a
commit 49ecdc7c1e
2 changed files with 17 additions and 0 deletions

View File

@@ -575,6 +575,14 @@ rule inherit-attributes ( project-module : parent-module )
}
# Returns whether the given string is a valid registered project id.
#
rule is-registered-id ( id )
{
return $($(id).jamfile-module) ;
}
# Associate the given id with the given project module. Returns the possibly
# corrected project id.
#

View File

@@ -374,6 +374,15 @@ class project-target : abstract-target
{
extra-error-message = could not resolve project reference
'$(project-part)' ;
if ! [ path.is-rooted $(project-part) ]
{
local rooted = [ path.root $(project-part) / ] ;
if [ project.is-registered-id $(rooted) ]
{
extra-error-message += - possibly missing a leading
slash ('/') character. ;
}
}
}
}
else