- BUILD - Table of Contents
- Prerequisites
- Windows Build
- Ubuntu 16.04 Xenial Build
- Ubuntu 15.10 Wily Build
- Ubuntu 14.04 Trusty Build
- Linux Build
- OS X Build
Building the gtest-runner from source requires having the following programs installed
- A working compiler
- Windows:
- Recommended: Visual Studio 2015.
- Minimum: Visual Studio 2013 is the minimum compatible compiler.
- Linux:
- Minimum: gcc 4.9.3.
- Windows:
- Qt
- Recommended: Qt 5.6 in order to support high-DPI monitors.
- Minimum: Qt 5.3 for non high-DPI monitors.
- CMake
- Recommended: CMake 3.6.2
- Minimum: CMake 2.8.12
- OPTIONAL
- git 2.7.0 or later
- NSIS 3.0 or later if you want to build the .exe installer.
These steps have been tested on Windows 10, but should be similar or the same for Windows 7/8.
Make sure you've installed all the prerequisites before proceeding!
- Download the Latest Source .zip, then unzip the source files.
- example: extract the files to
C:\workspace\gtest-runner
- Open a command line terminal by typing
cmd
into the cortana/start menu bar. - use
cd
to navigate to the root directory of the source code.
- example:
cd C:\workspace\gtest-runner
- Ensure that the
QTDIR
environment variable is properly set by typingecho %QTDIR%
. You should see something like
C:\Qt\5.6\msvc2015
where msvc2015 is the name of your compiler. If you are building for x64, it should be in the form msvc2015_64.
- If your
QTDIR
is not set, then set it usingset QTDIR=[path\to\Qt]
, where[path\to\Qt] is replaced with your install path, example:
set QTDIR=C:\Qt\5.6\msvc2015`
- Ensure the cmake path is visible to the command line by typing
cmake --version
. If you see
cmake version 3.4.3
or similar, proceed to step 6. Otherwise, determine the path to you cmake install, and add it to the path:
set PATH="C:\Program Files (x86)\CMake\bin";%PATH%
(be sure to use the proper path for YOUR install)
6. Type the following commands into the prompt, and press enter after each one
md build
cd build
cmake -Wno-dev ..
cmake --config Release --build .
- you can now run
gtest-runner.exe
from thebuild\Release
directory!
- (optional) If you have
NSIS
installed, you can create the installer package and install gtest-runner into yourProgram Files
.
cmake --target PACKAGE --config Release --build .
cd Release
- Run the installer using
gtest-runner-v[VERSION]-[TARGET].exe
, where version is the gtest-version that you downloaded, and target is win32 or win64 depending on your platform. If you're not sure what to use, type thedir
command to see which executable was generated.- example:
gtest-runner-v1.4.0-win32.exe
- example:
The installer is used to create program shortcuts and links in your application menu. If you prefer not to use the installer (or can't use it), you can still run gtest-runner.exe
directly from the Release directory.
- Open a terminal window
- Clone the repository and checkout the latest version of the code
git clone https://github.com/nholthaus/gtest-runner.git ~/gtest-runner
cd ~/gtest-runner
git tag -l
to see the available versionsgit checkout [version]
, where [version] was the newest version tag, example:git checkout v1.4.0
- Build and install the code
cd ~/gtest-runner
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
(or usemake -j2
if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner
into your console.
- Open a terminal window
- Clone the repository and checkout the latest version of the code
git clone https://github.com/nholthaus/gtest-runner.git ~/gtest-runner
cd ~/gtest-runner
git tag -l
to see the available versionsgit checkout [version]
, where [version] was the newest version tag, example:git checkout v1.4.0
- Build and install the code
cd ~/gtest-runner
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
(or usemake -j2
if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner
into your console.
- Open a terminal window
- Clone the repository and checkout the latest version of the code
git clone https://github.com/nholthaus/gtest-runner.git ~/gtest-runner
cd ~/gtest-runner
git tag -l
git checkout [version]
, where [version] was the newest version tag, example:git checkout v1.4.0
- Get gcc 4.9.3 (skip this step if you already have it, or have a newer version)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -qq
sudo apt-get install g++-4.9 -y
export CXX="g++-4.9"
- Get Qt 5.6 (skip this step if you already have it, or have a newer version)
sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y
sudo apt-get update -qq
sudo apt-get install qt57base -y
sudo apt-get install qt57xmlpatterns -y
source /opt/qt57/bin/qt57-env.sh
- Get CMake 3.4.3 (skip this step if you already have it, or have a newer version)
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update -qq
sudo apt-get install cmake -y
- Build and install the code
cd ~/gtest-runner
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
(usemake -j2
if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner
into your console.
Follow the instructions for the Ubuntu 14.04 Build, with the following exceptions:
Steps 3-5:
- use your systems package manager to get the prerequisites.
- if they are not available, download and build them from source. Make sure to set your
QTDIR
. Make sure yourPATH
variable includes the the cmakebin
directory.
No testing has been done with gtest-runner/OS X to date. If you're interested in using gtest-runner on a Mac, get in contact.