Successfully reported this slideshow.
Your SlideShare is downloading. ×

CMake&CLion

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 22 Ad
Advertisement

More Related Content

Advertisement

CMake&CLion

  1. 1. CMake&CLion
  2. 2. CMake
  3. 3. 16/11/16 Igor Khokhriakov 3 CMake ● Crossplatform build automatisation tool ● Declarative scripting language for managing native projects ● Dependency management (via pkg-config or cmake modules) ● Testing ● Packaging
  4. 4. 16/11/16 Igor Khokhriakov 4 CMakeLists.txt
  5. 5. 16/11/16 Igor Khokhriakov 5 Build using cmake ● mkdir build ● cd build ● cmake .. ● make ● make install … better use IDE like CLion
  6. 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. 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. 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 ...)
  9. 9. 16/11/16 Igor Khokhriakov 9 CLion
  10. 10. 16/11/16 Igor Khokhriakov 10
  11. 11. 16/11/16 Igor Khokhriakov 11 Agenda ● CMake support ● Navigation ● Refactoring ● Git integration ● Debugging
  12. 12. 16/11/16 Igor Khokhriakov 12 CMake support File->Settings OR ctrl+alt+s
  13. 13. 16/11/16 Igor Khokhriakov 13 CMake support ● CCache: ● Run targets
  14. 14. 16/11/16 Igor Khokhriakov 14 Navigation ● Find class: ctrl+n ● Find file: ctrl+shift+n ● Subclasses: ● Implementation &Override:
  15. 15. 16/11/16 Igor Khokhriakov 15 Navigation ● Methods lookup: ctrl+F12 OR structure tab ● Code navigation: ctrl+click on an item ● Find usages: Alt+F7
  16. 16. 16/11/16 Igor Khokhriakov 16 Refactoring ● Rename: shift+F6 ● Change signature: ctrl+F6 ● Move entity: F6 ● Generate definitions: ctrl+shift+d ● Generate...: alt+insert ● Generate constructor that matches super
  17. 17. 16/11/16 Igor Khokhriakov 17 Refactoring ● Extract method: highlight and ctrl+alt+m ● Extract variable: highlight and ctrl+alt+v ● Extract …: Refactoring->Extract – Constant – Parameter – Define – Typedef – Superclass – Subclass
  18. 18. 16/11/16 Igor Khokhriakov 18 Git integration ● Compare with branch... ● Make pull request ● Resolve conflicts ● Rebase ● Etc: VCS->Git; context menu->Git ● Local changes&history:
  19. 19. 16/11/16 Igor Khokhriakov 19 Debugging
  20. 20. 16/11/16 Igor Khokhriakov 20 Questions?
  21. 21. 16/11/16 Igor Khokhriakov 21 Thank you!
  22. 22. 11/16/16 Igor Khokhriakov 22 Friday November, 18th

Editor's Notes

  • Crossplatform – generates project files for different platforms
  • Type to filter

×