This document contains installation instructions for tools and libraries for the programming language C++. It uses the cross-platform build system CMake whenever the software to download, configure, build and run supports it.
When building with multiple compilers for multiple architectures, a certain naming scheme is used (Convention over Configuration), since the build description has to consist of the following four aspects to be unique:
- The compiler used.
- The version of the compiler used.
- The configuration (build type) of the software to build (normally
Release
). - The architecture of the software built (e.g.
x64
,x86
).
Combined with the three compilers MinGW-w64 / MinGW-Builds 7.2.0,
Microsoft Visual C++ (MSVC) 15.0 and Clang 4.0.0, using the build
system Ninja the default build types (configurations), i.e. using CMake
without any custom build type, leads to the following directory structure in the
Out-of-Source build directory _builds
.
└───_builds
└───build-gtest-1.8.0
├───x64
│ ├───clang50
│ │ ├───shared
│ │ │ ├───Debug
│ │ │ ├───MinSizeRel
│ │ │ ├───Release
│ │ │ ├───RelWithDebInfo
│ │ └───static
│ │ ├───Debug
│ │ ├───MinSizeRel
│ │ ├───Release
│ │ ├───RelWithDebInfo
│ ├───mgw72
│ │ ├───shared
│ │ │ ├───Debug
│ │ │ ├───MinSizeRel
│ │ │ ├───Release
│ │ │ ├───RelWithDebInfo
│ │ └───static
│ │ ├───Debug
│ │ ├───MinSizeRel
│ │ ├───Release
│ │ ├───RelWithDebInfo
│ ├───vc141
│ │ ├───shared
│ │ │ ├───Debug
│ │ │ ├───MinSizeRel
│ │ │ ├───Release
│ │ │ ├───RelWithDebInfo
│ │ └───static
│ │ ├───Debug
│ │ ├───MinSizeRel
│ │ ├───Release
│ │ ├───RelWithDebInfo
└───x86
├───clang50
│ ├───shared
│ │ ├───Debug
│ │ ├───MinSizeRel
│ │ ├───Release
│ │ ├───RelWithDebInfo
│ └───static
│ ├───Debug
│ ├───MinSizeRel
│ ├───Release
│ ├───RelWithDebInfo
├───mgw72
│ ├───shared
│ │ ├───Debug
│ │ ├───MinSizeRel
│ │ ├───Release
│ │ ├───RelWithDebInfo
│ └───static
│ ├───Debug
│ ├───MinSizeRel
│ ├───Release
│ ├───RelWithDebInfo
└───vc141
├───shared
│ ├───Debug
│ ├───MinSizeRel
│ ├───Release
│ ├───RelWithDebInfo
└───static
├───Debug
├───MinSizeRel
├───Release
└───RelWithDebInfo
TODOs:
- Remove 32-bit compile instructions (easy to adopt).
- Add each combination of static|shared target with static|shared run-time.
- Library
- Distributed Computing
- Build Tool
- Documentation Generator
- Profiler / Memory Debugger
- Code Coverage Tool
- Static Code Analyzer
- Integrated Development Environment
- Compiler
- Python
- Application
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://zlib.net/zlib-1.2.11.tar.gz -OutFile zlib-1.2.11.tar.gz"
tar -xf zlib-1.2.11.tar.gz
Open a MSVC 64-bit command prompt.
####### Static Release with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/vc141/release^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/static
cmake^
--build build-zlib-1.2.11/x64/vc141/release^
--config Release^
--target install
RD /S /Q "..\native\zlib\zlib-1.2.11-x64\static\bin"
DEL "..\native\zlib\zlib-1.2.11-x64\static\lib\zlib.lib"
MOVE "..\native\zlib\zlib-1.2.11-x64\static\lib\zlibstatic.lib" "..\native\zlib\zlib-1.2.11-x64\static\lib\zlib.lib"
####### Dynamic Release with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/vc141/release^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/shared
cmake^
--build build-zlib-1.2.11/x64/vc141/release^
--config Release^
--target install
DEL /F /Q "..\native\zlib\zlib-1.2.11-x64\shared\lib\*zlibstatic*"
####### Static Debug with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/vc141/debug^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_DEBUG_POSTFIX=d^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/static
cmake^
--build build-zlib-1.2.11/x64/vc141/debug^
--config Debug^
--target install
RD /S /Q "..\native\zlib\zlib-1.2.11-x64\static\bin"
DEL "..\native\zlib\zlib-1.2.11-x64\static\lib\zlibd.lib"
MOVE "..\native\zlib\zlib-1.2.11-x64\static\lib\zlibstaticd.lib" "..\native\zlib\zlib-1.2.11-x64\static\lib\zlibd.lib"
####### Dynamic Debug with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/vc141/debug^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_DEBUG_POSTFIX=d^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/shared
cmake^
--build build-zlib-1.2.11/x64/vc141/debug^
--config Debug^
--target install
DEL /F /Q "..\native\zlib\zlib-1.2.11-x64\shared\lib\*zlibstatic*"
Open a MinGW-w64 64-bit command prompt.
####### Static Release with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/mgw72/release^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/static
cmake^
--build build-zlib-1.2.11/x64/mgw72/release^
--config Release^
--target install
RD /S /Q "..\native\zlib\zlib-1.2.11-x64\static\bin"
DEL "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlib.dll.a"
MOVE "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlibstatic.lib" "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlib.lib"
####### Dynamic Release with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/mgw72/release^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/shared
cmake^
--build build-zlib-1.2.11/x64/mgw72/release^
--config Release^
--target install
DEL /F /Q "..\native\zlib\zlib-1.2.11-x64\shared\lib\*zlibstatic*"
####### Static Debug with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/mgw72/debug^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_DEBUG_POSTFIX=d^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/static
cmake^
--build build-zlib-1.2.11/x64/mgw72/debug^
--config Debug^
--target install
RD /S /Q "..\native\zlib\zlib-1.2.11-x64\static\bin"
DEL "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlibd.dll.a"
MOVE "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlibstaticd.lib" "..\native\zlib\zlib-1.2.11-x64\static\lib\libzlibd.lib"
####### Dynamic Debug with Shared Run-Time Library
cmake^
-GNinja^
-Hzlib-1.2.11^
-Bbuild-zlib-1.2.11/x64/mgw72/debug^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_DEBUG_POSTFIX=d^
-DCMAKE_INSTALL_PREFIX=../native/zlib/zlib-1.2.11-x64/shared
cmake^
--build build-zlib-1.2.11/x64/mgw72/debug^
--config Debug^
--target install
DEL /F /Q "..\native\zlib\zlib-1.2.11-x64\shared\lib\*zlibstatic*"
Download from https://github.com/philr/bzip2-windows/releases.
REM Open a MSYS2-MinGW64 command prompt
make -C bzip2-1.0.6 install PREFIX=../../native/bzip2/bzip2-1.0.6-x64
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/weidai11/cryptopp/archive/CRYPTOPP_5_6_5.zip -OutFile cryptopp-CRYPTOPP_5_6_5.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive cryptopp-CRYPTOPP_5_6_5.zip -Dest ."
TODO(wolters): When building for x64 (64bit) the cryptest.exe
is not generated if Ninja is used as the generator.
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x86
cmake --build build-cryptopp-5.6.5/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x86
cmake --build build-cryptopp-5.6.5/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - MinGW Makefiles" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x64
cmake --build build-cryptopp-5.6.5/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 64-bit command prompt.
cmake -G"CodeBlocks - MinGW Makefiles" -Hcryptopp-CRYPTOPP_5_6_5 -Bbuild-cryptopp-5.6.5/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cryptopp/cryptopp-5.6.5-x64
cmake --build build-cryptopp-5.6.5/x64/mgw72/Release --config Release --target install
TODO(wolters): Update Sodium section.
wget https://github.com/jedisct1/libsodium/archive/1.0.11.zip
unzip libsodium-1.0.11.zip
cd libsodium-1.0.11
./autogen.sh
./configure --prefix=/opt/libsodium/libsodium-1.0.11
make && make check
sudo make install
sudo ln -snf /opt/libsodium/libsodium-1.0.11 /opt/libsodium/default
The installation of Sodium can be tested by creating the following C++ program
(file hello_sodium.cc
):
#include <iostream>
#include <sodium.h>
int main() {
if (sodium_init() == -1) {
return 1;
}
std::cout << "hello, sodium\n";
}
Execute the following to compile, link and run the program:
g++ -o hello_sodium hello_sodium.cc -lsodium
./hello_sodium
The following should be printed to the standard output:
hello, world
TODO(wolters): Find solution to avoid the hack cxxflags=-D_hypot=hypot install
when building with MinGW-w64.
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://downloads.sf.net/project/boost/boost/1.65.1/boost_1_65_1.zip -OutFile boost_1_65_1.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive boost_1_65_1.zip -Dest ."
REM Open a MSVC 64-bit command prompt.
PUSHD boost_1_65_1
bootstrap
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x86/vc141 --layout=versioned toolset=msvc-14.1 address-model=32 architecture=x86 install --prefix=../../native/boost/boost-1.65.1
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x64/vc141 --layout=versioned --buildid=x64 toolset=msvc-14.1 address-model=64 architecture=x86 install --prefix=../../native/boost/boost-1.65.1
POPD
REM Open a MinGW-w64 command prompt.
PUSHD boost_1_65_1
bootstrap
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x86/mgw72 --layout=versioned toolset=gcc address-model=32 architecture=x86 cxxflags=-D_hypot=hypot install --prefix=../../native/boost/boost-1.65.1
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x64/mgw72 --layout=versioned --buildid=x64 toolset=gcc address-model=64 architecture=x86 cxxflags=-D_hypot=hypot install --prefix=../../native/boost/boost-1.65.1
POPD
REM Open a MinGW-w64 command prompt.
PUSHD boost_1_65_1
bootstrap
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x86/clang50 --layout=versioned toolset=clang address-model=32 architecture=x86 cxxflags="-target i686-w64-mingw32 -fmsc-version=0" linkflags="-target i686-w64-mingw32 -fmsc-version=0" install --prefix=../../native/boost/boost-1.65.1
b2 -j%NUMBER_OF_PROCESSORS% --reconfigure --build-type=complete --build-dir=../boost_1_65_1-build/x64/clang50 --layout=versioned --buildid=x64 toolset=clang address-model=64 architecture=x86 cxxflags="-target x86_64-w64-mingw32 -fmsc-version=0" linkflags="-target x86_64-w64-mingw32 -fmsc-version=0" install --prefix=../../native/boost/boost-1.65.1
POPD
wget http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip
unzip boost_1_65_1.zip
cd boost_1_65_1
./bootstrap.sh --with-toolset=gcc --prefix=/opt/boost/boost-1.65.1
sudo ./b2 -j3 --build-dir=boost-1.65.1-build --build-type=complete toolset=gcc cxxflags=-std=c++11 install
sudo ln -snf /opt/boost/boost-1.65.1 /opt/boost/default
REM The GSL is a header-only C++ library, therefore the arguments
REM CMAKE_BUILD_TYPE, CMAKE_CXX_COMPILER and BUILD_SHARED_LIBS do not
REM influence the build (as of 2017-10-18).
cmake -GNinja -Hgsl-master -Bbuild-gsl-master -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/gsl/gsl-master
cmake --build build-gsl-master --config Release --target install
wget http://download.qt.io/official_releases/qt/5.7/5.9.2/qt-opensource-linux-x64-5.9.2.run
chmod +x qt-opensource-linux-x64-5.9.2.run
./qt-opensource-linux-x64-5.9.2.run
Enter /opt/qt/qt-5.9.2
in the Installation Folder dialog.
-
Select the "Select All" button in the "Select Components" dialog.
-
Deselect the items "Sources" and "Qt Script (Deprecated)" below "Qt 5.9" and deselect the item "Tools".
sudo ln -snf /opt/qt/qt-5.9.2 /opt/qt/default
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/zeromq/libzmq/releases/download/v4.2.0/zeromq-4.2.0.zip -OutFile zeromq-4.2.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive zeromq-4.2.0.zip -Dest ."
REM Renaming the source directory to "libzmq" is mandatory to ensure referenced paths in other builds are set correctly.
MOVE zeromq-4.2.0 libzmq
REM Open a MSVC 32-bit command prompt.
cmake -G"CodeBlocks - NMake Makefiles" -Hlibzmq -Bbuild-zeromq-4.2.0/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x86
REM TODO(wolters): Building with CMake does not work with ZeroMQ 4.2.0. The following command is used to build the documentation only.
cmake --build build-zeromq-4.2.0/x86/vc141/Release --config Release --target install
PUSHD libzmq\builds\msvc\build
CALL build
POPD
XCOPY /I /Q /Y build-zeromq-4.2.0\x86\vc141\Release\doc ..\native\zeromq\zeromq-4.2.0-x86\doc\zmq
XCOPY /I /Q /Y libzmq\include ..\native\zeromq\zeromq-4.2.0-x86\include
XCOPY /I /Q /Y libzmq\bin\Win32\Release\v140\dynamic\*.exe ..\native\zeromq\zeromq-4.2.0-x86\bin
XCOPY /I /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\bin
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Release\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-s-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-gd-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-gd-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\Win32\Debug\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-sgd-4_2_0.lib*
XCOPY /Q /Y libzmq\AUTHORS ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\AUTHORS*.txt
XCOPY /I /Q /Y libzmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x86\share\zmq
MOVE /Y ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING.LESSER.txt
XCOPY /Q /Y libzmq\COPYING ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\COPYING*.txt
XCOPY /Q /Y libzmq\NEWS ..\native\zeromq\zeromq-4.2.0-x86\share\zmq\NEWS*.txt
REM Copy libraries to simplify build of zmqpp.
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\zmq.lib*
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x86\lib\libzmq-v140-mt-s-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x86\lib\zmq-static.lib*
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hlibzmq -Bbuild-zeromq-4.2.0/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x86
cmake --build build-zeromq-4.2.0/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -G"CodeBlocks - NMake Makefiles" -Hlibzmq -Bbuild-zeromq-4.2.0/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x64
REM TODO(wolters): Building with CMake does not work with ZeroMQ 4.2.0. The following command is used to build the documentation only.
cmake --build build-zeromq-4.2.0/x64/vc141/Release --config Release --target install
PUSHD libzmq\builds\msvc\build
CALL build
POPD
XCOPY /I /Q /Y build-zeromq-4.2.0\x64\vc141\Release\doc ..\native\zeromq\zeromq-4.2.0-x64\doc\zmq
XCOPY /I /Q /Y libzmq\include ..\native\zeromq\zeromq-4.2.0-x64\include
XCOPY /I /Q /Y libzmq\bin\x64\Release\v140\dynamic\*.exe ..\native\zeromq\zeromq-4.2.0-x64\bin
XCOPY /I /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\bin
XCOPY /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\x64\Release\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Release\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-s-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\dynamic\libzmq.dll ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-gd-4_2_0.dll*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\dynamic\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-gd-4_2_0.lib*
XCOPY /Q /Y libzmq\bin\x64\Debug\v140\static\libzmq.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-sgd-4_2_0.lib*
XCOPY /Q /Y libzmq\AUTHORS ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\AUTHORS*.txt
XCOPY /I /Q /Y libzmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x64\share\zmq
MOVE /Y ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING.LESSER ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING.LESSER.txt
XCOPY /Q /Y libzmq\COPYING ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\COPYING*.txt
XCOPY /Q /Y libzmq\NEWS ..\native\zeromq\zeromq-4.2.0-x64\share\zmq\NEWS*.txt
REM Copy libraries to simplify build of zmqpp.
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\zmq.lib*
XCOPY /Q /Y ..\native\zeromq\zeromq-4.2.0-x64\lib\libzmq-v140-mt-s-4_2_0.lib ..\native\zeromq\zeromq-4.2.0-x64\lib\zmq-static.lib*
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hlibzmq -Bbuild-zeromq-4.2.0/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zeromq-4.2.0-x64
cmake --build build-zeromq-4.2.0/x64/mgw72/Release --config Release --target install
TODO(wolters): The CMakeLists.txt
does not work when building with Microsoft Windows. Add the following:
if(WIN32)
target_link_libraries(zmqpp wsock32 ws2_32)
endif()
if(WIN32)
target_link_libraries(zmqpp-static wsock32 ws2_32)
endif()
Also, wrap the CMAKE_CXX_FLAGS
modifications into a if statement.
if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) # ... endif()
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/zeromq/zmqpp/archive/4.1.2.zip -OutFile zmqpp-4.1.2.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive zmqpp-4.1.2.zip -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x86 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x86 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -GNinja -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x64 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hzmqpp-4.1.2 -Bbuild-zmqpp-4.1.2/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/zeromq/zmqpp-4.1.2-x64 -DZEROMQ_INCLUDE_DIR=%ZEROMQ_INCLUDEDIR% -DZEROMQ_LIB_DIR=%ZEROMQ_LIBRARYDIR%
cmake --build build-zmqpp-4.1.2/x64/mgw72/Release --config Release --target install
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/billyquith/ponder/archive/1.3.0.zip -OutFile ponder-1.3.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive ponder-1.3.0.zip -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x86
cmake --build build-ponder-1.3.0/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x86
cmake --build build-ponder-1.3.0/x86/mgw72/Release --config Release --target install
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x64
cmake --build build-ponder-1.3.0/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hponder-1.3.0 -Bbuild-ponder-1.3.0/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/ponder/ponder-1.3.0-x64
cmake --build build-ponder-1.3.0/x64/mgw72/Release --config Release --target install
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri http://rttr.org/releases/rttr-0.9.5-src.zip -OutFile rttr-0.9.5-src.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive rttr-0.9.5-src.zip -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x86
cmake --build build-rttr-0.9.5/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x86
cmake --build build-rttr-0.9.5/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -GNinja -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x64
cmake --build build-rttr-0.9.5/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hrttr-0.9.5-src -Bbuild-rttr-0.9.5/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/rttr/rttr-0.9.5-x64
cmake --build build-rttr-0.9.5/x64/mgw72/Release --config Release --target install
Cereal is a header-only library.
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/USCiLab/cereal/archive/v1.2.1.zip -OutFile cereal-1.2.1"
powershell -NoLogo -NoProfile -Command "Expand-Archive cereal-1.2.1 -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x86
cmake --build build-cereal-1.2.1/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x86
cmake --build build-cereal-1.2.1/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -GNinja -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x64
cmake --build build-cereal-1.2.1/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hcereal-1.2.1 -Bbuild-cereal-1.2.1/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cereal/cereal-1.2.1-x64
cmake --build build-cereal-1.2.1/x64/mgw72/Release --config Release --target install
The following commands build Protobuf with support for zlib. In order to make the
commands work the environment variable ZLIB_ROOT
has to be set pointing to the
root directory of a prebuilt zlib installation.
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/google/protobuf/archive/v3.5.0.1.zip -OutFile protobuf-3.5.0.1.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive protobuf-3.5.0.1.zip -Dest ."
Open a MSVC 64-bit command prompt.
####### Static Release with Shared Run-Time Library
cmake^
-GNinja^
-Hprotobuf-3.5.0.1/cmake^
-Bbuild-protobuf-3.5.0.1/x64/vc141/Release/static^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.5.0.1-x64^
-Dprotobuf_BUILD_SHARED_LIBS=OFF^
-Dprotobuf_BUILD_TESTS=OFF^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF^
-Dprotobuf_WITH_ZLIB=ON^
-DZLIB_ROOT="%ZLIB_ROOT%"
cmake^
--build build-protobuf-3.5.0.1/x64/vc141/Release/static^
--config Release^
--target install
####### Shared Release with Shared Run-Time Library
cmake^
-GNinja^
-Hprotobuf-3.5.0.1/cmake^
-Bbuild-protobuf-3.5.0.1/x64/vc141/Release/shared^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.5.0.1-x64^
-Dprotobuf_BUILD_SHARED_LIBS=OFF^
-Dprotobuf_BUILD_TESTS=OFF^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF^
-Dprotobuf_WITH_ZLIB=ON^
-DZLIB_ROOT="%ZLIB_ROOT%"
cmake^
--build build-protobuf-3.5.0.1/x64/vc141/Release/shared^
--config Release^
--target install
Open a MinGW-w64 64-bit command prompt.
####### Static Release with Shared Run-Time Library
cmake^
-GNinja^
-Hprotobuf-3.5.0.1/cmake^
-Bbuild-protobuf-3.5.0.1/x64/mgw72/Release/static^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_CXX_COMPILER=g++^
-DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.5.0.1-x64^
-Dprotobuf_BUILD_TESTS=OFF^
-Dprotobuf_BUILD_SHARED_LIBS=OFF^
-Dprotobuf_BUILD_TESTS=OFF^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF^
-Dprotobuf_WITH_ZLIB=ON^
-DZLIB_ROOT="%ZLIB_ROOT%"
cmake^
--build build-protobuf-3.5.0.1/x64/mgw72/Release/static^
--config Release^
--target install
####### Shared Release with Shared Run-Time Library
cmake^
-GNinja^
-Hprotobuf-3.5.0.1/cmake^
-Bbuild-protobuf-3.5.0.1/x64/vc141/Release/shared^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=gcc^
-DCMAKE_CXX_COMPILER=g++^
-DCMAKE_INSTALL_PREFIX=../native/protobuf/protobuf-3.5.0.1-x64^
-Dprotobuf_BUILD_SHARED_LIBS=OFF^
-Dprotobuf_BUILD_TESTS=OFF^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF^
-Dprotobuf_WITH_ZLIB=ON^
-DZLIB_ROOT="%ZLIB_ROOT%"
cmake^
--build build-protobuf-3.5.0.1/x64/vc141/Release/shared^
--config Release^
--target install
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/jbeder/yaml-cpp/archive/release-0.5.3.zip -OutFile yaml-cpp-yaml-cpp-0.5.3.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive yaml-cpp-yaml-cpp-0.5.3.zip -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-0.5.3/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x86
cmake --build build-yaml-cpp-0.5.3/x86/vc141/Release --config Release --target install
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-0.5.3/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x86
cmake --build build-yaml-cpp-0.5.3/x86/mgw72/Release --config Release --target install
REM Open a MSVC 64-bit command prompt.
cmake -GNinja -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-yaml-cpp-0.5.3/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x64
cmake --build build-yaml-cpp-yaml-cpp-0.5.3/x64/vc141/Release --config Release --target install
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hyaml-cpp-yaml-cpp-0.5.3 -Bbuild-yaml-cpp-yaml-cpp-0.5.3/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/yaml-cpp/yaml-cpp-0.5.3-x64
cmake --build build-yaml-cpp-yaml-cpp-0.5.3/x64/mgw72/Release --config Release --target install
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/sevenjay/cpp-markdown/archive/master.zip -OutFile cpp-markdown-master.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive cpp-markdown-master.zip -Dest ."
REM Open a MSVC 32-bit command prompt.
cmake -GNinja -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x86/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x86
cmake --build build-cpp-markdown-head/x86/vc141/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.lib ../native/cpp-markdown/cpp-markdown-head-x86/lib
REM Open a MinGW-w64 32-bit command prompt.
cmake -GNinja -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x86/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x86
cmake --build build-cpp-markdown-head/x86/mgw72/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.a ../native/cpp-markdown/cpp-markdown-head-x86/lib
REM Open a MSVC 64-bit command prompt.
cmake -GNinja -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x64/vc141/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x64
cmake --build build-cpp-markdown-head/x64/vc141/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.lib ../native/cpp-markdown/cpp-markdown-head-x86/lib
REM Open a MinGW-w64 64-bit command prompt.
cmake -GNinja -Hcpp-markdown-master -Bbuild-cpp-markdown-head/x64/mgw72/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/cpp-markdown/cpp-markdown-head-x64
cmake --build build-cpp-markdown-head/x64/mgw72/Release --config Release --target all
XCOPY /I /Q /Y cpp-markdown-master/src/*.h ../native/cpp-markdown/cpp-markdown-head-x86/include
XCOPY /I /Q /Y cpp-markdown-master-build/*.a ../native/cpp-markdown/cpp-markdown-head-x86/lib
powershell -NoLogo -NoProfile -Command "Invoke-WebRequest -Uri https://github.com/google/googletest/archive/release-1.8.0.zip -OutFile googletest-release-1.8.0.zip"
powershell -NoLogo -NoProfile -Command "Expand-Archive googletest-release-1.8.0.zip -Dest ."
cmake -GNinja -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/mgw72/Release/static -DCMAKE_BUILD_TYPE=Release -Dgtest_disable_pthreads=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64
cmake --build build-gtest-1.8.0/x64/mgw72/Release/static --config Release --target install
cmake -GNinja -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/mgw72/Release/shared -DCMAKE_BUILD_TYPE=Release -Dgtest_disable_pthreads=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64
cmake --build build-gtest-1.8.0/x64/mgw72/Release/shared --config Release --target install
cmake -GNinja -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/mgw72/Debug/static -DCMAKE_BUILD_TYPE=Debug -Dgtest_disable_pthreads=ON -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64
cmake --build build-gtest-1.8.0/x64/mgw72/Debug/static --config Debug --target install
cmake -GNinja -Hgoogletest-release-1.8.0 -Bbuild-gtest-1.8.0/x64/mgw72/Debug/shared -DCMAKE_BUILD_TYPE=Debug -Dgtest_disable_pthreads=ON -DCMAKE_DEBUG_POSTFIX=d -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64
cmake --build build-gtest-1.8.0/x64/mgw72/Debug/shared --config Debug --target install
cmake^
-GNinja^
-Hgoogletest-release-1.8.0^
-Bbuild-gtest-1.8.0/x64/vc141/Release/static^
-DBUILD_SHARED_LIBS=OFF^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64^
-Dgtest_build_samples=OFF^
-Dgtest_build_tests=OFF^
-DGTEST_CREATE_SHARED_LIBRARY=OFF^
-Dgtest_force_shared_crt=OFF
cmake^
--build build-gtest-1.8.0/x64/vc141/Release/static^
--config Release^
--target install
cmake^
-GNinja^
-Hgoogletest-release-1.8.0^
-Bbuild-gtest-1.8.0/x64/vc141/Release/shared^
-DBUILD_SHARED_LIBS=ON^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_RELEASE_POSTFIX=md^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64^
-Dgtest_build_samples=OFF^
-Dgtest_build_tests=OFF^
-DGTEST_CREATE_SHARED_LIBRARY=OFF^
-Dgtest_force_shared_crt=ON
cmake^
--build build-gtest-1.8.0/x64/vc141/Release/shared^
--config Release^
--target install
cmake^
-GNinja^
-Hgoogletest-release-1.8.0^
-Bbuild-gtest-1.8.0/x64/vc141/Debug/static^
-DBUILD_SHARED_LIBS=OFF^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_DEBUG_POSTFIX=d^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64^
-Dgtest_build_samples=OFF^
-Dgtest_build_tests=OFF^
-DGTEST_CREATE_SHARED_LIBRARY=OFF^
-Dgtest_force_shared_crt=OFF
cmake^
--build build-gtest-1.8.0/x64/vc141/Debug/static^
--config Debug^
--target install
cmake^
-GNinja^
-Hgoogletest-release-1.8.0^
-Bbuild-gtest-1.8.0/x64/vc141/Debug/shared^
-DBUILD_SHARED_LIBS=ON^
-DCMAKE_BUILD_TYPE=Debug^
-DCMAKE_DEBUG_POSTFIX=mdd^
-DCMAKE_C_COMPILER=cl^
-DCMAKE_CXX_COMPILER=cl^
-DCMAKE_INSTALL_PREFIX=../native/gtest/gtest-1.8.0-x64^
-Dgtest_build_samples=OFF^
-Dgtest_build_tests=OFF^
-DGTEST_CREATE_SHARED_LIBRARY=OFF^
-Dgtest_force_shared_crt=ON
cmake^
--build build-gtest-1.8.0/x64/vc141/Debug/shared^
--config Debug^
--target install
su
wget http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO-6.3.1.tar.gz
tar -xf ACE+TAO-6.3.1.tar.gz
export ACE_ROOT=$PWD/ACE_wrappers
echo "#include <ace/config-linux.h>" > $ACE_ROOT/ace/config.h
echo "" >> $ACE_ROOT/ace/config.h
echo "INSTALL_PREFIX = /usr/local" > $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo "include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
sudo make install -C $ACE_ROOT/ace
make -C $ACE_ROOT/apps/gperf
export TAO_ROOT=$ACE_ROOT/TAO
make install -C $TAO_ROOT
wget https://cmake.org/cmake/help/v3.10/CMake.qch
wget http://cmake.org/files/v3.10/cmake-3.10.0.tar.gz
tar -xf cmake-3.10.0.tar.gz
cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/cmake/cmake-3.10.0 -Bcmake-3.10.0-build -Hcmake-3.10.0
cmake --build cmake-3.10.0-build --target install
sudo mv CMake.qch /opt/cmake/cmake-3.10.0/doc
sudo ln -snf /opt/cmake/cmake-3.10.0 /opt/cmake/default
wget https://cmake.org/cmake/help/v3.8/CMake.qch
wget http:/cmake.org/files/v3.8/cmake-3.10.0-Linux-x86_64.sh
sh cmake-3.10.0-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo mv cmake-3.10.0-Linux-x86_64 /opt/cmake/cmake-3.10.0
sudo mv CMake.qch /opt/cmake/cmake-3.10.0/doc
sudo ln -snf /opt/cmake/cmake-3.10.0 /opt/cmake/default
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz
tar -xf doxygen-1.8.13.src.tar.gz
cmake -G"Unix Makefiles" -Dbuild_doc=NO -Dbuild_wizard=YES -DCMAKE_INSTALL_PREFIX:PATH=/opt/doxygen/doxygen-1.8.13 -Bdoxygen-1.8.13-build -Hdoxygen-1.8.13
cmake --build doxygen-1.8.13-build --target install
sudo ln -snf /opt/doxygen/doxygen-1.8.13 /opt/doxygen/default
tar -xf doxygen-1.8.13.linux.bin.tar.gz
python -m compileall doxytag.py
mv doxytag.pyc doxygen-1.8.13/bin/doxytag
cd doxygen-1.8.13
./configure --prefix /opt/doxygen/doxygen-1.8.13
sudo make install
sudo ln -snf /opt/doxygen/doxygen-1.8.13 /opt/doxygen/default
wget http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2
tar -xf valgrind-3.11.0.tar.bz2
cd valgrind-3.11.0
sh ./configure --build x86_64-w64-linux-gnu
# If using "MinGW" with a "Microsoft Windows" OS:
#sh ./configure --build x86_64-w64-mingw32
make
make check
wget http://downloads.sf.net/ltp/lcov-1.12.tar.gz
tar -xf lcov-1.12.tar.gz
sudo make install -C lcov-1.12 PREFIX=/opt/lcov/lcov-1.12
sudo ln -snf /opt/lcov/lcov-1.12 /opt/lcov/default
Automatic install with "Pip Installs Python (pip)":
pip install gcovr
If installing into a custom location (e.g. ~/usr):
wget https://github.com/gcovr/gcovr/archive/3.3.zip
unzip gcovr-3.3.zip
mkdir -p /opt/gcovr/gcovr-3.3/bin
sudo cp gcovr-3.3/scripts/gcovr /opt/gcovr/gcovr-3.3/bin
sudo ln -snf /opt/gcovr/gcovr-3.3 /opt/gcovr/default
wget https://github.com/AlDanial/cloc/releases/download/v1.74/cloc-1.74.tar.gz
tar -xf cloc-1.74.tar.gz
sudo mkdir -p /opt/cloc/cloc-1.74/bin
sudo cp cloc-1.70/cloc /opt/cloc/cloc-1.74/bin
sudo ln -snf /opt/cloc/cloc-1.74 /opt/cloc/default
wget http://downloads.sf.net/project/cppcheck/cppcheck/1.81/cppcheck-1.81.zip
unzip cppcheck-1.81.tar.gz
sudo make install -C cppcheck-1.81 SRCDIR=build PREFIX=/opt/cppcheck/cppcheck-1.81 CFGDIR=/opt/cppcheck/cppcheck-1.81
sudo ln -snf /opt/cppcheck/cppcheck-1.81 /opt/cppcheck/default
tar -xf flawfinder-2.0.4.tar.gz
sudo make install -C flawfinder-2.0.4 prefix=/opt/flawfinder/flawfinder-2.0.4
sudo ln -snf /opt/flawfinder/flawfinder-2.0.4 /opt/flawfinder/default
wget http://include-what-you-use.org/downloads/include-what-you-use-0.8.src.tar.gz
tar -xf include-what-you-use-0.8.src.tar.gz
cmake -G"Unix Makefiles" -Binclude-what-you-use-0.8-build -Hinclude-what-you-use -DIWYU_LLVM_ROOT_PATH=/opt/clang+llvm/default -DCMAKE_INSTALL_PREFIX=/opt/include-what-you-use/include-what-you-use-0.8
sudo cmake --build include-what-you-use-0.8-build --target install
sudo cp include-what-you-use/iwyu_tool.py /opt/include-what-you-use/include-what-you-use-0.8/bin
sudo ln -snf /opt/include-what-you-use/include-what-you-use-0.8 /opt/include-what-you-use/default
sudo ln -nf /opt/include-what-you-use/default/bin/include-what-you-use /opt/clang+llvm/default/bin/include-what-you-use
sudo ln -nf /opt/include-what-you-use/default/bin/iwyu_tool.py /opt/clang+llvm/default/bin/iwyu_tool.py
wget http://download.qt.io/official_releases/qtcreator/4.3/4.4.1/qt-creator-opensource-linux-x86_64-4.4.1.run
chmod +x qt-creator-opensource-linux-x86_64-4.4.1.run
./ qt-creator-opensource-linux-x86_64-4.4.1.run
Enter /opt/qt-creator/qt-creator-4.4.1
following in the Installation Folder dialog.
sudo ln -snf /opt/qt-creator/qt-creator-4.4.1 /opt/qt-creator/default
wget http://mirrors.cdn.adacore.com/art/5739cefdc7a447658e0b016b
tar -xf gnat-gpl-2016-x86_64-linux-bin.tar.gz
./gnat-gpl-2016-x86_64-linux-bin/doinstall
Enter the following in the installation wizard:
/opt/gnat-gpl/gnat-gpl-2016
ln -snf /opt/gnat-gpl/gnat-gpl-2016 /opt/gnat-gpl/default
gnatmake --version
Check the standard output:
GNATMAKE GPL 2016 (20160515-49)
Copyright (C) 1995-2016, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
wget llvm-5.0.0.src.tar.xz
wget compiler-rt-5.0.0.src.tar.xz
wget cfe-5.0.0.src.tar.xz
wget clang-tools-extra-5.0.0.src.tar.xz
tar -xf llvm-5.0.0.src.tar.xz
tar -xf compiler-rt-5.0.0.src.tar.xz
tar -xf cfe-5.0.0.src.tar.xz
tar -xf clang-tools-extra-5.0.0.src.tar.xz
mv -f ./cfe-5.0.0.src ./clang
mv -f ./clang ./llvm-5.0.0.src/tools
mv -f ./compiler-rt-5.0.0.src ./compiler-rt
mv -f ./compiler-rt ./llvm-5.0.0.src/projects
mv -f ./clang-tools-extra-5.0.0.src ./extra
mv -f ./extra ./llvm-5.0.0.src/tools/clang/tools
Build out-of-source with CMake and install
cmake -G"Unix Makefiles" -Bllvm-5.0.0.build -Hllvm-5.0.0.src -DCMAKE_INSTALL_PREFIX=/opt/clang+llvm/clang+llvm-5.0.0
cmake --build llvm-5.0.0.build
sudo cmake --build llvm-5.0.0.build --target install
sudo ln -snf /opt/clang+llvm/llvm-5.0.0 /opt/llvm/default
Try to run a syntax check on a file using clang++
:
clang++ -v main.cc -fsyntax-only
Check the standard/error output. If the output contains something similar to the following, Clang is unable to detect libstd++:
main.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
Check the include paths of GCC:
g++ -v -x c++ /dev/null -fsyntax-only
Add the include paths missing for Clang to the environment variable
CPLUS_INCLUDE_PATH
:
export CPLUS_INCLUDE_PATH=/usr/include/c++/5:/usr/include/c++/5/x86_64-suse-linux:$CPLUS_INCLUDE_PATH
Check via the following command:
clang++ -v -x c++ /dev/null -fsyntax-only
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
# Update all packages.
pip freeze > requirements.txt && pip install --upgrade -r requirements.txt && rm requirements.txt
wget https://github.com/dannagle/PacketSender/archive/v5.4.2.tar.gz
tar -xf PacketSender-5.4.2.tar.gz
cd PacketSender-5.4.2/src
qmake
make
sudo mkdir -p /opt/packetsender/packetsender-5.4.2/bin /opt/packetsender/packetsender-5.4.2/doc
sudo cp PacketSender /opt/packetsender/packetsender-5.4.2/bin
sudo cp ../LICENSE ../README.md /opt/packetsender/packetsender-5.4.2/doc
sudo ln -snf /opt/packetsender/packetsender-5.4.2 /opt/packetsender/default
GSL: Guideline Support Library [33]: http://bzip.org bzip2