From f164cd2d4e4e2eb5cfab0d85632b83e0144c94d3 Mon Sep 17 00:00:00 2001 From: klendathu2k Date: Tue, 12 Mar 2024 14:21:09 -0400 Subject: [PATCH] Add VMC include path if separate from ROOT. --- mgr/Conscript-standard | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mgr/Conscript-standard b/mgr/Conscript-standard index 62ea10a8fd8..351a42afb33 100644 --- a/mgr/Conscript-standard +++ b/mgr/Conscript-standard @@ -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 { @@ -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"; } @@ -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;