Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDS Build: Allow DCMAKE_MAKE_PROGRAM in cmake #13737

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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