BUILD - Table of Contents
October 19, 2016 ยท View on GitHub
- 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
Prerequisites
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.
Windows Build
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
cmdinto the cortana/start menu bar. - use
cdto navigate to the root directory of the source code.
- example:
cd C:\workspace\gtest-runner
- Ensure that the
QTDIRenvironment 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
QTDIRis 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 buildcd buildcmake -Wno-dev ..cmake --config Release --build .- you can now run
gtest-runner.exefrom thebuild\Releasedirectory!
- (optional) If you have
NSISinstalled, 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 thedircommand 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.
Ubuntu 16.04 Xenial Build
- 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-runnercd ~/gtest-runnergit tag -lto 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-runnermkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Release ..make(or usemake -j2if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner into your console.
Ubuntu 15.10 Wily Build
- 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-runnercd ~/gtest-runnergit tag -lto 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-runnermkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Release ..make(or usemake -j2if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner into your console.
Ubuntu 14.04 Trusty Build
- 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-runnercd ~/gtest-runnergit tag -lgit 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 -ysudo apt-get update -qqsudo apt-get install g++-4.9 -yexport 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 -ysudo apt-get update -qqsudo apt-get install qt57base -ysudo apt-get install qt57xmlpatterns -ysource /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 -ysudo apt-get update -qqsudo apt-get install cmake -y
- Build and install the code
cd ~/gtest-runnermkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Release ..make(usemake -j2if you have a dual-core machine)sudo make install
You can now run the gtest-runner by typing gtest-runner into your console.
Linux Build
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 yourPATHvariable includes the the cmakebindirectory.
OS X Build
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.