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:
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user