@@ -82,22 +82,21 @@ def __getattr__(cls, name):
8282 pwd = "/" .join (os .getcwd ().split ("/" )[:- 2 ])
8383 os .system ("git submodule update --init --recursive ../../externalpackages/fmt" )
8484 cmake = (
85- "cmake . -DBOUT_USE_FFTW=ON"
86- + " -DBOUT_USE_LAPACK=OFF"
87- + " -DBOUT_ENABLE_PYTHON=ON"
88- + " -DBOUT_UPDATE_GIT_SUBMODULE=OFF"
89- + " -DBOUT_TESTS=OFF"
90- + " -DBOUT_ALLOW_INSOURCE_BUILD=ON"
91- + f" -DPython3_ROOT_DIR={ pydir } "
92- + f" -Dmpark_variant_DIR={ pwd } /externalpackages/mpark.variant/"
93- + f" -Dfmt_DIR={ pwd } /externalpackages/fmt/"
85+ "cmake . "
86+ " -B build"
87+ " -DBOUT_USE_FFTW=ON"
88+ " -DBOUT_USE_LAPACK=OFF"
89+ " -DBOUT_ENABLE_PYTHON=ON"
90+ " -DBOUT_UPDATE_GIT_SUBMODULE=OFF"
91+ " -DBOUT_TESTS=OFF"
92+ " -DBOUT_ALLOW_INSOURCE_BUILD=ON"
93+ f" -DPython3_ROOT_DIR={ pydir } "
94+ f" -Dmpark_variant_DIR={ pwd } /externalpackages/mpark.variant/"
95+ f" -Dfmt_DIR={ pwd } /externalpackages/fmt/"
9496 )
95- # os.system("mkdir ../../build")
96- os .system ("echo " + cmake )
97- x = os .system ("cd ../.. ;" + cmake )
98- assert x == 0
99- x = os .system ("cd ../.. ; make -j 2 -f Makefile" )
100- assert x == 0
97+ subprocess .run (f"echo { cmake } " , shell = True )
98+ subprocess .run (f"cd ../../; { cmake } " , shell = True , check = True )
99+ subprocess .run ("cd ../.. ; cmake --build build -j 2" , shell = True , check = True )
101100
102101
103102# readthedocs currently runs out of memory if we actually dare to try to do this
0 commit comments