Skip to content

Commit f4485fd

Browse files
committed
Moved c:\projects\third_party\googletest git repository to c:\projects\bin2cpp\third_party\googletest for appveyor.
Splitted /ci/appveyor/install.bat script into /ci/windowslocal/googletest_install.bat and /ci/appveyor/googletest_build.bat for readability and reusability on a local windows machine.
1 parent 1235e8a commit f4485fd

File tree

6 files changed

+71
-33
lines changed

6 files changed

+71
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
/msvc/bin2cpp_unittest
1212
/msvc/testfilegenerator
1313
/nsis/bin
14+
/third_party

appveyor.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ clone_folder: c:\projects\bin2cpp
4242

4343
# environment variables
4444
environment:
45-
GTEST_DEBUG_LIBRARIES: gtest.lib
46-
GTEST_RELEASE_LIBRARIES: gtest.lib
47-
GTEST_INCLUDE: c:\projects\third_party\googletest\include
48-
GTEST_LIBRARY_DIR: c:\projects\third_party\googletest\msvc2010
4945
PRODUCT_VERSION: 1.4
5046

5147
# scripts that run after cloning repository
5248
install:
53-
- cmd: call c:\projects\bin2cpp\ci\appveyor\install.bat
49+
- cmd: call c:\projects\bin2cpp\ci\windowslocal\googletest_install.bat
50+
- cmd: call c:\projects\bin2cpp\ci\appveyor\googletest_build.bat
51+
- cmd: call c:\projects\bin2cpp\ci\appveyor\list_env_var.bat
5452

5553
#---------------------------------#
5654
# build configuration #

ci/appveyor/googletest_build.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo =======================================================================
2+
echo Building google test library
3+
echo =======================================================================
4+
cd /d %REPOSITORY_ROOT%\third_party\googletest\msvc2010
5+
msbuild "msvc2010\gtest.sln" /m /verbosity:minimal
6+
7+
echo =======================================================================
8+
echo Done
9+
echo =======================================================================

ci/appveyor/install.bat

Lines changed: 0 additions & 28 deletions
This file was deleted.

ci/appveyor/list_env_var.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo =======================================================================
2+
echo Displaying Environnment Variables
3+
echo =======================================================================
4+
set
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
@echo off
2+
3+
echo =======================================================================
4+
echo Finding root folder of repository
5+
echo =======================================================================
6+
cd /d %~dp0
7+
cd ..\..
8+
set REPOSITORY_ROOT=%cd%
9+
echo REPOSITORY_ROOT=%REPOSITORY_ROOT%
10+
echo done.
11+
echo.
12+
13+
echo ======================================================================
14+
echo Cloning google test repository
15+
echo =======================================================================
16+
git clone https://github.com/google/googletest.git %REPOSITORY_ROOT%\third_party\googletest
17+
cd /d %REPOSITORY_ROOT%\googletest
18+
git checkout release-1.6.0
19+
echo done.
20+
echo.
21+
22+
echo =======================================================================
23+
echo Generating google test Visual Studio 2010 solution
24+
echo =======================================================================
25+
cd /d %REPOSITORY_ROOT%\third_party\googletest
26+
27+
echo Deleting previous msvc2010 folder (if any)
28+
rmdir /s/q msvc2010 >NUL 2>NUL
29+
echo done.
30+
echo.
31+
32+
echo Creating msvc2010 folder.
33+
mkdir %REPOSITORY_ROOT%\third_party\googletest\msvc2010
34+
echo done.
35+
echo.
36+
37+
echo Launching cmake...
38+
cd /d %REPOSITORY_ROOT%\third_party\googletest\msvc2010
39+
cmake -G "Visual Studio 10 2010" -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS_DEBUG=/MDd -DCMAKE_CXX_FLAGS_RELEASE=/MD "%REPOSITORY_ROOT%\third_party\googletest"
40+
echo done.
41+
echo.
42+
43+
echo =======================================================================
44+
echo Setting environnment variables for googletest
45+
echo =======================================================================
46+
set GTEST_DEBUG_LIBRARIES=gtest.lib
47+
set GTEST_RELEASE_LIBRARIES=gtest.lib
48+
set GTEST_INCLUDE=%GTEST_HOME%\include
49+
set GTEST_LIBRARY_DIR=%GTEST_HOME%\msvc2010
50+
setx GTEST_DEBUG_LIBRARIES %GTEST_DEBUG_LIBRARIES%
51+
setx GTEST_RELEASE_LIBRARIES %GTEST_RELEASE_LIBRARIES%
52+
setx GTEST_INCLUDE %GTEST_INCLUDE%
53+
setx GTEST_LIBRARY_DIR %GTEST_LIBRARY_DIR%
54+
set GTEST_

0 commit comments

Comments
 (0)