Skip to content

Commit

Permalink
Merge pull request firemodels#13737 from cxp484/master
Browse files Browse the repository at this point in the history
FDS Build: Allow DCMAKE_MAKE_PROGRAM in cmake
  • Loading branch information
gforney authored Nov 12, 2024
2 parents 5eba74f + 0e29523 commit 9625908
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Build/Scripts/HYPRE/build_hypre.bat
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ echo ----------------------------------------------------------
echo ----------------------------------------------------------
echo.

::Check if make.bat or make.exe exists, and set CMAKE_MAKE_PROGRAM accordingly
set CMAKE_MAKE_PROGRAM=
for /f "delims=" %%i in ('where make.bat 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i
if not defined CMAKE_MAKE_PROGRAM (
for /f "delims=" %%i in ('where make.exe 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i
)
if not defined CMAKE_MAKE_PROGRAM (
echo Error: Neither make.bat nor make.exe found in PATH.
exit /b 1
)

echo.
echo make proram is %CMAKE_MAKE_PROGRAM%
echo.

set BUILDDIR=%LIB_REPO%\src\cmbuild
cd %BUILDDIR%
cmake ..\ ^
Expand All @@ -138,6 +153,7 @@ cmake ..\ ^
-DCMAKE_C_COMPILER=icx ^
-DCMAKE_C_FLAGS="/DWIN32 -O3 /fp:precise" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ^
-DCMAKE_MAKE_PROGRAM="%CMAKE_MAKE_PROGRAM%" ^
-DCMAKE_INSTALL_LIBDIR="lib"

echo.
Expand Down
16 changes: 16 additions & 0 deletions Build/Scripts/SUNDIALS/build_sundials.bat
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ echo ----------------------------------------------------------
echo ----------------------------------------------------------
echo.

::Check if make.bat or make.exe exists, and set CMAKE_MAKE_PROGRAM accordingly
set CMAKE_MAKE_PROGRAM=
for /f "delims=" %%i in ('where make.bat 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i
if not defined CMAKE_MAKE_PROGRAM (
for /f "delims=" %%i in ('where make.exe 2^>nul') do set CMAKE_MAKE_PROGRAM=%%i
)
if not defined CMAKE_MAKE_PROGRAM (
echo Error: Neither make.bat nor make.exe found in PATH.
exit /b 1
)

echo.
echo make proram is %CMAKE_MAKE_PROGRAM%
echo.

cmake ..\ ^
-G "MinGW Makefiles" ^
-DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" ^
Expand All @@ -123,6 +138,7 @@ cmake ..\ ^
-DENABLE_OPENMP=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_INSTALL_LIBDIR="lib" ^
-DCMAKE_MAKE_PROGRAM="%CMAKE_MAKE_PROGRAM%" ^
-DCMAKE_C_FLAGS_RELEASE="${CMAKE_C_FLAGS_RELEASE} /MT" ^
-DCMAKE_C_FLAGS_DEBUG="${CMAKE_C_FLAGS_DEBUG} /MTd"

Expand Down

0 comments on commit 9625908

Please sign in to comment.