Skip to content

Commit

Permalink
#437 [Windows] Use Ninja as the CMake Generator
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri Baron <[email protected]>
  • Loading branch information
barondim committed Nov 26, 2024
1 parent 4985b9e commit c2fac0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Open `x64 Native Tools Command Prompt for VS2019` and run the following commands
> cd dynawo-project
> git clone https://github.com/dynawo/dynawo-algorithms.git
> cd dynawo-algorithms
> cmake -S . -B b -DUSE_MPI=YES -DCMAKE_INSTALL_PREFIX=../da-i -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME=../dynawo/deploy/dynawo -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR=. -G "NMake Makefiles"
> cmake -S . -B b -DUSE_MPI=YES -DCMAKE_INSTALL_PREFIX=../da-i -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME=../dynawo/deploy/dynawo -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR=. -G "Ninja"
> cmake --build b --target install
```

Expand Down
4 changes: 2 additions & 2 deletions util/windows/dynawo-algorithms.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ if not defined _devmode (
cmake -E make_directory %DYNAWO_ALGORITHMS_INSTALL_DIR%
set _build_tmp=%DYNAWO_ALGORITHMS_INSTALL_DIR%\~build.tmp.cmd
(
echo cmake -S "%DYNAWO_ALGORITHMS_HOME%" -B "%DYNAWO_ALGORITHMS_BUILD_DIR%" -DUSE_MPI=%DYNAWO_USE_MPI% -DCMAKE_INSTALL_PREFIX="%DYNAWO_ALGORITHMS_INSTALL_DIR%" -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=%DYNAWO_BUILD_TYPE% -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME="%DYNAWO_HOME%" -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR="%DYNAWO_ALGORITHMS_HOME%" -DDYNAWO_PYTHON_COMMAND="%DYNAWO_PYTHON_COMMAND%" -G "NMake Makefiles" -Wno-dev
echo cmake -S "%DYNAWO_ALGORITHMS_HOME%" -B "%DYNAWO_ALGORITHMS_BUILD_DIR%" -DUSE_MPI=%DYNAWO_USE_MPI% -DCMAKE_INSTALL_PREFIX="%DYNAWO_ALGORITHMS_INSTALL_DIR%" -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=%DYNAWO_BUILD_TYPE% -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME="%DYNAWO_HOME%" -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR="%DYNAWO_ALGORITHMS_HOME%" -DDYNAWO_PYTHON_COMMAND="%DYNAWO_PYTHON_COMMAND%" -G "Ninja" -Wno-dev
echo cmake --build "%DYNAWO_ALGORITHMS_BUILD_DIR%" --target install
echo %0 _EXIT_ "%_build_tmp%" %ERRORLEVEL%
) > "%_build_tmp%"
Expand Down Expand Up @@ -395,7 +395,7 @@ set DYNAWO_USE_XSD_VALIDATION=true
:: build with GTest and run all tests or a specific test
set _test=dynawo_algorithms_%~2_unittest-tests
if "%~2"=="" set _test=tests
cmake -S "%DYNAWO_ALGORITHMS_HOME%" -B "%DYNAWO_ALGORITHMS_BUILD_DIR%" -DUSE_MPI=%DYNAWO_USE_MPI% -DCMAKE_INSTALL_PREFIX="%DYNAWO_ALGORITHMS_INSTALL_DIR%" -DBUILD_TESTS=ON -DGTEST_ROOT="%DYNAWO_GTEST_HOME%" -DGMOCK_HOME="%DYNAWO_GMOCK_HOME%" -DCMAKE_BUILD_TYPE=%DYNAWO_BUILD_TYPE% -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME="%DYNAWO_HOME%" -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR="%DYNAWO_ALGORITHMS_HOME%" -DDYNAWO_PYTHON_COMMAND="%DYNAWO_PYTHON_COMMAND%" -G "NMake Makefiles" -Wno-dev
cmake -S "%DYNAWO_ALGORITHMS_HOME%" -B "%DYNAWO_ALGORITHMS_BUILD_DIR%" -DUSE_MPI=%DYNAWO_USE_MPI% -DCMAKE_INSTALL_PREFIX="%DYNAWO_ALGORITHMS_INSTALL_DIR%" -DBUILD_TESTS=ON -DGTEST_ROOT="%DYNAWO_GTEST_HOME%" -DGMOCK_HOME="%DYNAWO_GMOCK_HOME%" -DCMAKE_BUILD_TYPE=%DYNAWO_BUILD_TYPE% -DDYNAWO_ALGORITHMS_HOME=. -DDYNAWO_HOME="%DYNAWO_HOME%" -DDYNAWO_ALGORITHMS_THIRD_PARTY_DIR="%DYNAWO_ALGORITHMS_HOME%" -DDYNAWO_PYTHON_COMMAND="%DYNAWO_PYTHON_COMMAND%" -G "Ninja" -Wno-dev
if defined _show goto:LIST_TESTS
:: check if valid unit test
cmake --build "%DYNAWO_ALGORITHMS_BUILD_DIR%" --target help | find "%_test%" >NUL || goto:INVALID_TEST
Expand Down

0 comments on commit c2fac0c

Please sign in to comment.