@@ -99,6 +99,7 @@ def __init__(self, name):
9999 self .diffDir = ""
100100 self .diffOpts = ""
101101
102+ self .cmakeSetupOpts = ""
102103 self .addToCompileString = ""
103104 self .ignoreGlobalMakeAdditions = 0
104105
@@ -381,6 +382,7 @@ def __init__(self, args):
381382 self .launch_dir = os .getcwd ()
382383
383384 self .useCmake = 0
385+ self .isSuperbuild = 0
384386 self .use_ctools = 1
385387
386388 self .reportCoverage = args .with_coverage
@@ -1171,7 +1173,7 @@ def cmake_build( self, name, target, path, opts = '', env = None, outfile = None
11711173 else :
11721174 coutfile = f'{ self .full_test_dir } { name } .{ target } .make.log'
11731175
1174- cmd = f'{ self .MAKE } -j{ self .numMakeJobs } { opts } { target } '
1176+ cmd = f'cmake --build { self .source_build_dir } -j { self .numMakeJobs } -- { opts } { target } '
11751177 self .log .log (cmd )
11761178 stdout , stderr , rc = test_util .run (cmd , outfile = coutfile , cwd = path , env = ENV )
11771179
@@ -1192,6 +1194,19 @@ def build_test_cmake(self, test, opts="", outfile=None):
11921194
11931195 env = {"AMReX_ROOT" :self .amrex_install_dir }
11941196
1197+ # super-builds always need a configure now, all other builds might
1198+ # add additional CMake config options and re-configure on existing configured
1199+ # build directory, if additional build cmakeSetupOpts are set
1200+ if self .isSuperbuild or test .cmakeSetupOpts != "" :
1201+ builddir , installdir = self .cmake_config (
1202+ name = test .name ,
1203+ path = self .source_dir ,
1204+ configOpts = self .amrex_cmake_opts + " " +
1205+ self .source_cmake_opts + " " +
1206+ test .cmakeSetupOpts )
1207+ self .source_build_dir = builddir
1208+
1209+ # compile
11951210 rc , comp_string = self .cmake_build ( name = test .name ,
11961211 target = test .target ,
11971212 path = self .source_build_dir ,
0 commit comments