Skip to content

Commit c6e9e4f

Browse files
rcsanchez97kevinAlbs
authored andcommitted
CDRIVER-3699 simplify Evergreen scripts
1 parent 7454162 commit c6e9e4f

6 files changed

+22
-28
lines changed

.evergreen/install-uninstall-check-windows.cmd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ mkdir %BUILD_DIR%
2727
rmdir /S /Q %INSTALL_DIR%
2828
mkdir %INSTALL_DIR%
2929

30-
set PATH=%PATH%;"c:\Program Files (x86)\MSBuild\14.0\Bin"
31-
set PATH=%PATH%;"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
3230
set PATH=%PATH%;%INSTALL_DIR%\bin
3331

3432
cd %BUILD_DIR%
@@ -46,11 +44,11 @@ if "%BSON_ONLY%"=="1" (
4644
echo.%CC%| findstr /I "gcc">Nul && (
4745
rem Build libmongoc, with flags that the downstream R driver mongolite uses
4846
%CMAKE% -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%CMAKE_MAKE_PROGRAM% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_CFLAGS="-std=c99 -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake %BSON_ONLY_OPTION% .
49-
%CMAKE_MAKE_PROGRAM%
47+
%CMAKE% --build .
5048
if errorlevel 1 (
5149
exit /B 1
5250
)
53-
%CMAKE_MAKE_PROGRAM% install
51+
%CMAKE% --build . --target install
5452
if errorlevel 1 (
5553
exit /B 1
5654
)
@@ -79,17 +77,17 @@ echo.%CC%| findstr /I "gcc">Nul && (
7977

8078
dir %INSTALL_DIR%\share\mongo-c-driver
8179

82-
%CMAKE_MAKE_PROGRAM% uninstall
80+
%CMAKE% --build . --target uninstall
8381
if errorlevel 1 (
8482
exit /B 1
8583
)
8684
) || (
8785
%CMAKE% -G "%CC%" "-DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%" "-DCMAKE_BUILD_TYPE=Debug" %BSON_ONLY_OPTION% .
88-
MSBuild.exe /m ALL_BUILD.vcxproj
86+
%CMAKE% --build . --config Debug
8987
if errorlevel 1 (
9088
exit /B 1
9189
)
92-
MSBuild.exe /m INSTALL.vcxproj
90+
%CMAKE% --build . --config Debug --target install
9391
if errorlevel 1 (
9492
exit /B 1
9593
)
@@ -118,7 +116,7 @@ echo.%CC%| findstr /I "gcc">Nul && (
118116

119117
dir %INSTALL_DIR%\share\mongo-c-driver
120118

121-
MSBuild.exe /m generate_uninstall\uninstall.vcxproj
119+
%CMAKE% --build . --target uninstall
122120
if errorlevel 1 (
123121
exit /B 1
124122
)

.evergreen/install-uninstall-check.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ fi
4848

4949

5050
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $BSON_ONLY_OPTION .
51-
make
51+
$CMAKE --build .
5252
if [ "$DESTDIR" ]; then
53-
make DESTDIR=$DESTDIR install
53+
DESTDIR=$DESTDIR $CMAKE --build . --target install
5454
else
55-
make install
55+
$CMAKE --build . --target install
5656
fi
5757
touch $INSTALL_DIR/lib/canary.txt
5858

@@ -78,7 +78,7 @@ fi
7878

7979
ls -l $INSTALL_DIR/share/mongo-c-driver
8080

81-
make uninstall
81+
$CMAKE --build . --target uninstall
8282

8383
set +o xtrace
8484

.evergreen/link-sample-program-bson.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ $TAR xf ../../mongoc.tar.gz -C . --strip-components=1
5050
if [ "$LINK_STATIC" ]; then
5151
# Our CMake system builds shared and static by default.
5252
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF -DENABLE_BSON=ON .
53-
make
54-
make install
53+
$CMAKE --build .
54+
$CMAKE --build . --target install
5555
else
5656
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF -DENABLE_BSON=ON -DENABLE_STATIC=OFF .
57-
make
58-
make install
57+
$CMAKE --build .
58+
$CMAKE --build . --target install
5959

6060
set +o xtrace
6161

@@ -161,7 +161,7 @@ if [ "$BUILD_SAMPLE_WITH_CMAKE" ]; then
161161

162162
cd $EXAMPLE_DIR
163163
$CMAKE -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake .
164-
make
164+
$CMAKE --build .
165165
else
166166
# Test our pkg-config file.
167167
export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig

.evergreen/link-sample-program-mingw-bson.cmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ set INSTALL_DIR=%CD%\install-dir
2121
rmdir /S /Q %INSTALL_DIR%
2222
mkdir %INSTALL_DIR%
2323

24-
set PATH=%PATH%;"c:\Program Files (x86)\MSBuild\14.0\Bin"
25-
set PATH=%PATH%;"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
2624
set PATH=%PATH%;%INSTALL_DIR%\bin
2725

2826
cd %BUILD_DIR%
2927
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
3028

3129
rem Build libmongoc, with flags that the downstream R driver mongolite uses
3230
%CMAKE% -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%CMAKE_MAKE_PROGRAM% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_CFLAGS="-std=c99 -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DENABLE_BSON=ON -DENABLE_STATIC=ON .
33-
%CMAKE_MAKE_PROGRAM%
31+
%CMAKE% --build .
3432
if errorlevel 1 (
3533
exit /B 1
3634
)
3735

38-
%CMAKE_MAKE_PROGRAM% install
36+
%CMAKE% --build . --target install
3937
if errorlevel 1 (
4038
exit /B 1
4139
)

.evergreen/link-sample-program-mingw.cmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@ set INSTALL_DIR=%CD%\install-dir
2121
rmdir /S /Q %INSTALL_DIR%
2222
mkdir %INSTALL_DIR%
2323

24-
set PATH=%PATH%;"c:\Program Files (x86)\MSBuild\14.0\Bin"
25-
set PATH=%PATH%;"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
2624
set PATH=%PATH%;%INSTALL_DIR%\bin
2725

2826
cd %BUILD_DIR%
2927
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
3028

3129
rem Build libmongoc, with flags that the downstream R driver mongolite uses
3230
%CMAKE% -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%CMAKE_MAKE_PROGRAM% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_CFLAGS="-std=c99 -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake %CMAKE_FLAGS% -DENABLE_BSON=ON .
33-
%CMAKE_MAKE_PROGRAM%
31+
%CMAKE% --build .
3432
if errorlevel 1 (
3533
exit /B 1
3634
)
3735

38-
%CMAKE_MAKE_PROGRAM% install
36+
%CMAKE% --build . --target install
3937
if errorlevel 1 (
4038
exit /B 1
4139
)

.evergreen/link-sample-program.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ fi
8383

8484

8585
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $SSL_CMAKE_OPTION $SNAPPY_CMAKE_OPTION $STATIC_CMAKE_OPTION -DENABLE_BSON=ON -DENABLE_ZSTD=$ZSTD .
86-
make
87-
make install
86+
$CMAKE --build .
87+
$CMAKE --build . --target install
8888

8989
ls -l $INSTALL_DIR/lib
9090

@@ -201,7 +201,7 @@ if [ "$BUILD_SAMPLE_WITH_CMAKE" ]; then
201201

202202
cd $EXAMPLE_DIR
203203
$CMAKE -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake .
204-
make
204+
$CMAKE --build .
205205
else
206206
# Test our pkg-config file.
207207
export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig

0 commit comments

Comments
 (0)