Skip to content

Commit

Permalink
Add VMC include path if separate from ROOT.
Browse files Browse the repository at this point in the history
  • Loading branch information
klendathu2k committed Mar 12, 2024
1 parent 40e8340 commit f164cd2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mgr/Conscript-standard
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ print "idlL = @idlL\n" if $param::debug;
my (@src, @h_files, @idlM);
my $CPPPATH = $env1->{CPPPATH};

$CPPPATH .= helpers::vmcPath();

if ($pkg eq "RTS") {
if ($STAR_SYS =~ /^x86_darwin/) {}
else {
Expand Down Expand Up @@ -728,9 +730,10 @@ if ( $pkg !~ /^sim$/ && $pkg !~ /^gen$/ ) {
$CPPPATH .= $main::PATH_SEPARATOR . $g4prefix . "/include/Geant4/";

# Add G4 vmc to include path (presumes that spack has added this to ROOT_INCLUDE_PATH ...)
# Add vmc package to include path (ditto)
my @paths = split ":", $ENV{ROOT_INCLUDE_PATH};
foreach my $p (@paths) {
if ($p =~ /geant4-vmc/) {
if ($p =~ /geant4-vmc/ ) {
print $p, "\n";
$CPPPATH .= $main::PATH_SEPARATOR . $p . "/geant4vmc";
}
Expand Down Expand Up @@ -1472,6 +1475,19 @@ if ( $#src > -1 ) {
}
}
#_________________________________________________________________________________
sub helpers::vmcPath {
# If VMC is supplied separtely from root
my @paths = split ":", $ENV{ROOT_INCLUDE_PATH};
my $result = "";
foreach my $p (@paths) {
if ($p =~ /\/vmc-/ ) {
print $p, "\n";
$result .= $main::PATH_SEPARATOR . $p . "/vmc";
}
}
return $result;
}
#_________________________________________________________________________________
sub script::MakeMoc {
my $envQt = shift;
my $pkg = shift;
Expand Down

0 comments on commit f164cd2

Please sign in to comment.