5. 16/11/16 Igor Khokhriakov 5
Build using cmake
● mkdir build
● cd build
● cmake ..
● make
● make install
… better use IDE like CLion
6. 16/11/16 Igor Khokhriakov 6
Where get help?
● No good book :(
● Find some opensource project and explore it
– https://github.com/pni-libraries/libpnicore
– https://github.com/ufo-kit/ufo-core
● CMake itself... for gurus
7. 16/11/16 Igor Khokhriakov 7
CMake guide lines
● Use the following structure:
– configure
– include
– docs
– src
– test
● Use dedicated project when configuration is
totally different
8. 16/11/16 Igor Khokhriakov 8
CMake guide lines
● Split complex project into modules
– add_library(my_module OBJECT …)
● Use CTest for integration testing. Unit tests
must be independent
● Use CPack to generate packages and custom
targets to deploy them
– add_custom_target(COMMAND curl ...)