Skip to content
forked from ruslo/polly

🔧 Collection of CMake toolchain files and scripts for cross-platform build and CI testing (GCC, Visual Studio, iOS, Android, Clang analyzer, sanitizers etc.)

License

Notifications You must be signed in to change notification settings

BobbyBabes/polly

This branch is 349 commits behind ruslo/polly:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

647719a · Jan 26, 2018
Jan 26, 2018
Dec 19, 2017
Dec 6, 2017
Mar 11, 2016
Dec 31, 2013
Dec 16, 2017
Apr 20, 2015
Oct 27, 2017
Nov 25, 2015
Sep 27, 2017
Dec 14, 2017
Jul 25, 2016
Dec 14, 2017
Nov 30, 2017
Nov 2, 2013
Nov 24, 2016
Mar 22, 2016
Dec 8, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Dec 8, 2016
Aug 28, 2016
Aug 28, 2016
Mar 29, 2017
Aug 1, 2017
Mar 17, 2017
Dec 8, 2016
Aug 28, 2016
Aug 28, 2016
Dec 8, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Sep 6, 2017
Aug 28, 2016
Aug 26, 2017
Jan 20, 2017
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 1, 2017
Aug 28, 2016
Aug 28, 2016
Dec 8, 2016
Aug 28, 2016
Aug 28, 2016
Aug 1, 2017
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Aug 28, 2016
Jan 3, 2017
Jan 3, 2017
Mar 17, 2017
Mar 29, 2017
Mar 29, 2017
Mar 29, 2017
Mar 17, 2017
Mar 17, 2017
Mar 31, 2017
Jun 26, 2017
Sep 14, 2017
Sep 14, 2017
Sep 14, 2017
Sep 14, 2017
Oct 12, 2017
Oct 12, 2017
Oct 12, 2017
Oct 12, 2017
Dec 15, 2017
Sep 13, 2017
Sep 2, 2017
Sep 13, 2017
Sep 13, 2017
Jan 8, 2018
Dec 15, 2017
Jan 5, 2018
Dec 15, 2017
Jan 9, 2018
Dec 15, 2017
Jan 8, 2018
Jul 28, 2016
Jul 28, 2016
Jul 28, 2016
Jul 28, 2016
Dec 14, 2017
Sep 22, 2017
Dec 17, 2017
Oct 25, 2017
Oct 25, 2017
Jul 25, 2017
Aug 22, 2014
May 23, 2017
Aug 27, 2014
Apr 11, 2017
Jul 14, 2014
Jul 29, 2014
Sep 1, 2016
Mar 31, 2017
Mar 16, 2017
Dec 8, 2016
Mar 15, 2016
Aug 27, 2014
May 14, 2017
Oct 24, 2017
Dec 19, 2017
Apr 6, 2017
Jan 26, 2018
Aug 11, 2015
Jul 15, 2015
Feb 5, 2016
Nov 25, 2015
May 5, 2017
May 3, 2017
May 7, 2017
Apr 16, 2017
Feb 5, 2016
May 3, 2017
May 3, 2017
Mar 22, 2016
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 25, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 27, 2017
Oct 17, 2017
Sep 25, 2017
Nov 8, 2017
Nov 8, 2017
Dec 12, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Oct 15, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Nov 30, 2017
Jan 10, 2018
Jan 10, 2018
Sep 28, 2017
Dec 28, 2017
Sep 6, 2017
Oct 18, 2017
Sep 28, 2017
Sep 25, 2017
Dec 12, 2017
Dec 5, 2017
Dec 4, 2017
Jan 7, 2018
Dec 12, 2017
Dec 5, 2017
Sep 26, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 6, 2017
Sep 27, 2017
Sep 27, 2017
Dec 8, 2016
Feb 5, 2016
Dec 8, 2016
Jul 31, 2015
Apr 11, 2017
Mar 22, 2016
Sep 21, 2017
Sep 21, 2017
Sep 21, 2017
Sep 21, 2017
Aug 8, 2015
Oct 10, 2017
Aug 14, 2017
Aug 14, 2017
Mar 17, 2017
Jul 14, 2014
Nov 11, 2014
Apr 16, 2016
Jul 11, 2016
Jan 27, 2016
Jan 27, 2016
Nov 30, 2017
Jun 11, 2015
Apr 13, 2016
Jun 11, 2015
May 12, 2017
Dec 8, 2016
May 12, 2017
Nov 5, 2016
Sep 28, 2016
Sep 17, 2015
Dec 22, 2016
Sep 26, 2017
Nov 30, 2017
May 5, 2017
Jan 19, 2017
Jan 19, 2017
Dec 8, 2016
Dec 7, 2016
Oct 29, 2016
Oct 7, 2017
Sep 26, 2017
Jun 11, 2015
Jun 11, 2015
Jun 11, 2015
Oct 27, 2017
Oct 25, 2017
Aug 29, 2017
May 29, 2017
Jul 23, 2017
Jul 24, 2017
Aug 27, 2014
Aug 27, 2014
Aug 27, 2014
Aug 27, 2014
Jan 27, 2016
Aug 11, 2016
Aug 11, 2016
Jan 27, 2016
Aug 11, 2016
Aug 16, 2016
Jan 27, 2016
Jan 27, 2016
Jan 27, 2016
Aug 11, 2016
Sep 22, 2016
Sep 22, 2016
Jul 5, 2016
Jan 27, 2016
Dec 16, 2017
Dec 16, 2017
Aug 29, 2017
Apr 4, 2017
Jan 27, 2016
Jan 27, 2016
Dec 22, 2016
Jun 11, 2015
Dec 8, 2016
Dec 23, 2016
Sep 24, 2016
Jun 11, 2015

Repository files navigation

Polly

Join the chat at https://gitter.im/polly-cmake/Lobby

Collection of CMake toolchain files and scripts.

Linux/OSX Windows
Build Status Build Status

Every toolchain defines compiler/flags and two variables:

  • POLLY_TOOLCHAIN_NAME
  • POLLY_TOOLCHAIN_TAG

First variable will be printed while processing file:

-- [polly] Used toolchain: Name of toolchain A
-- The CXX compiler identification is Clang 5.0.0
-- Check for working CXX compiler: /usr/bin/c++
-- [polly] Used toolchain: Name of toolchain A
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- [polly] Used toolchain: Name of toolchain A
-- Detecting CXX compiler ABI info - done
-- [polly] Used toolchain: Name of toolchain A
-- Configuring done
-- Generating done
-- Build files have been written to: ...

Second variable coincide with toolchain file name and can be used to define CMAKE_INSTALL_PREFIX like:

set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/_install/${POLLY_TOOLCHAIN_TAG}")

In this case targets can coexist simultaneously:

 - Project\ -
            - CMakeLists.txt
            - sources\
            - documentation\
            - ...
            - _install\ -
                        - toolchain-A\
                        - toolchain-B\
                        - toolchain-C\
                        - ...

Note: This is a core idea of the tagged builds in hunter package manager.

New documentation

Toolchains

Usage

Just define CMAKE_TOOLCHAIN_FILE variable:

> cmake -H. -B_builds/clang-libstdcxx -DCMAKE_TOOLCHAIN_FILE=${POLLY_ROOT}/clang-libstdcxx.cmake -DCMAKE_VERBOSE_MAKEFILE=ON
-- [polly] Used toolchain: clang / GNU Standard C++ Library (libstdc++) / c++11 support
-- The CXX compiler identification is Clang 5.0.0
-- Check for working CXX compiler: /usr/bin/c++
-- [polly] Used toolchain: clang / GNU Standard C++ Library (libstdc++) / c++11 support
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- [polly] Used toolchain: clang / GNU Standard C++ Library (libstdc++) / c++11 support
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /.../_builds/make-debug

Take a look at make output, you must see -stdlib=libstdc++ string:

> cmake --build _builds/clang_libstdcxx
/usr/bin/c++ -std=c++11 -stdlib=libstdc++ -o CMakeFiles/.../main.cpp.o -c /.../main.cpp

build.py

This is a python script that wrap cmake for you and automatically set:

  • build directory for your toolchain. E.g. _builds/xcode, _builds/libcxx-Debug, _builds/nmake-Release
  • local install directory. E.g. _install/vs-12-2013-x64, _install/libcxx
  • start an IDE project (Xcode, Visual Studio) if option --open passed
  • run ctest after the build done if option --test passed
  • run cpack after the build done if option --pack passed
  • create OS X/iOS framework if option --framework passed (can be used for broken iOS framework creation on CMake)

Example of usage (also see build.py --help):

  • build Debug Xcode project:
    • build.py --toolchain xcode --config Debug (_builds/xcode)
  • build and test Release Makefile project with libcxx:
    • build.py --toolchain libcxx --config Release --test (_builds/libcxx-Release)
  • install Debug Xcode project:
    • build.py --toolchain xcode --config Debug --install (_builds/xcode, _install/xcode)

Examples

See examples. Please read coding style and agreements before start looking through examples (may explain a lot). Take a look at the Travis config files: mac and linux, it's quite self-explanatory.

Contributing

See CONTRIBUTING.md.

Links

About

🔧 Collection of CMake toolchain files and scripts for cross-platform build and CI testing (GCC, Visual Studio, iOS, Android, Clang analyzer, sanitizers etc.)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CMake 84.0%
  • Python 15.6%
  • Other 0.4%