diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-01 10:31:42 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-01 10:31:42 +0300 |
commit | ed5c9477579645bbadba458ec4209a31b2158a9b (patch) | |
tree | 95e4a743dec3ab9520bee794e5f941b7a111f0bf | |
parent | boost.md: update (diff) | |
download | notes-ed5c9477579645bbadba458ec4209a31b2158a9b.tar.gz notes-ed5c9477579645bbadba458ec4209a31b2158a9b.zip |
boost.md: how to use it with CMake
Diffstat (limited to '')
-rw-r--r-- | boost.md | 67 |
1 files changed, 67 insertions, 0 deletions
@@ -139,3 +139,70 @@ using gcc : : x86_64-w64-mingw32-g++ ; ... ... ``` + +Usage in CMake +-------------- + +### Visual Studio + +#### x86 + +``` +> cd +D:\workspace\build\test_project\msvc\x64 + +> cmake -G "Visual Studio 14 2015" ^ + -D BOOST_ROOT=D:\workspace\third-party\boost_1_61_0\msvc ^ + -D BOOST_LIBRARYDIR=D:\workspace\third-party\boost_1_61_0\msvc\stage\x86\lib ^ + -D Boost_USE_STATIC_LIBS=ON ^ + -D Boost_USE_STATIC_RUNTIME=ON ^ + ... +``` + +#### x64 + +``` +> cd +D:\workspace\build\test_project\msvc\x86 + +> cmake -G "Visual Studio 14 2015 Win64" ^ + -D BOOST_ROOT=D:\workspace\third-party\boost_1_61_0\msvc ^ + -D BOOST_LIBRARYDIR=D:\workspace\third-party\boost_1_61_0\msvc\stage\x64\lib ^ + -D Boost_USE_STATIC_LIBS=ON ^ + -D Boost_USE_STATIC_RUNTIME=ON ^ + ... +``` + +### Cygwin + MinGW-w64 + +#### x86 + +``` +> cd +/cygdrive/d/workspace/build/test_project/mingw/x86/debug + +> cmake -G "Unix Makefiles" \ + -D CMAKE_BUILD_TYPE=Debug \ + -D CMAKE_C_COMPILER=i686-w64-mingw32-gcc \ + -D CMAKE_CXX_COMPILER=i686-w64-mingw32-g++ \ + -D BOOST_ROOT=/cygdrive/d/workspace/third-party/boost_1_61_0/mingw \ + -D BOOST_LIBRARYDIR=/cygdrive/d/workspace/third-party/boost_1_61_0/mingw/x86/debug/lib \ + -D Boost_USE_STATIC_LIBS=ON \ + ... +``` + +#### x64 + +``` +> cd +/cygdrive/d/workspace/build/test_project/mingw/x64/debug + +> cmake -G "Unix Makefiles" \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ + -D CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ + -D BOOST_ROOT=/cygdrive/d/workspace/third-party/boost_1_61_0/mingw \ + -D BOOST_LIBRARYDIR=/cygdrive/d/workspace/third-party/boost_1_61_0/mingw/x64/debug/lib \ + -D Boost_USE_STATIC_LIBS=ON \ + ... +``` |