-
Biznes i ekonomia
- Bitcoin
- Bizneswoman
- Coaching
- Controlling
- E-biznes
- Ekonomia
- Finanse
- Giełda i inwestycje
- Kompetencje osobiste
- Komputer w biurze
- Komunikacja i negocjacje
- Mała firma
- Marketing
- Motywacja
- Multimedialne szkolenia
- Nieruchomości
- Perswazja i NLP
- Podatki
- Polityka społeczna
- Poradniki
- Prezentacje
- Przywództwo
- Public Relation
- Raporty, analizy
- Sekret
- Social Media
- Sprzedaż
- Start-up
- Twoja kariera
- Zarządzanie
- Zarządzanie projektami
- Zasoby ludzkie (HR)
-
Dla dzieci
-
Dla młodzieży
-
Edukacja
-
Encyklopedie, słowniki
-
E-prasa
-
Historia
-
Informatyka
- Aplikacje biurowe
- Aplikacje biznesowe
- Bazy danych
- Bioinformatyka
- Biznes IT
- CAD/CAM
- Digital Lifestyle
- DTP
- Elektronika
- Fotografia cyfrowa
- Grafika komputerowa
- Gry
- Hacking
- Hardware
- IT w ekonomii
- Pakiety naukowe
- Podręczniki szkolne
- Podstawy komputera
- Programowanie
- Programowanie mobilne
- Serwery internetowe
- Sieci komputerowe
- Start-up
- Systemy operacyjne
- Sztuczna inteligencja
- Technologia dla dzieci
- Webmasterstwo
-
Inne
-
Języki obce
-
Kultura i sztuka
-
Lektury szkolne
-
Literatura
- Antologie
- Ballada
- Dla dorosłych
- Dramat
- Dzienniki, pamiętniki, listy
- Epos, epopeja
- Esej
- Fantastyka i science-fiction
- Felietony
- Fikcja
- Humor, satyra
- Inne
- Klasyczna
- Kryminał
- Literatura faktu
- Literatura piękna
- Mity i legendy
- Nobliści
- Nowele
- Obyczajowa
- Okultyzm i magia
- Opowiadania
- Pamiętniki
- Podróże
- Poemat
- Poezja
- Polityka
- Popularnonaukowa
- Powieść
- Powieść historyczna
- Proza
- Przygodowa
- Publicystyka
- Reportaż
- Romans i literatura obyczajowa
- Sensacja
- Thriller, Horror
- Wywiady i wspomnienia
-
Nauki przyrodnicze
-
Nauki społeczne
-
Podręczniki szkolne
-
Popularnonaukowe i akademickie
- Archeologia
- Bibliotekoznawstwo
- Filmoznawstwo
- Filologia
- Filologia polska
- Filozofia
- Finanse i bankowość
- Geografia
- Gospodarka
- Handel. Gospodarka światowa
- Historia i archeologia
- Historia sztuki i architektury
- Kulturoznawstwo
- Lingwistyka
- Literaturoznawstwo
- Logistyka
- Matematyka
- Medycyna
- Nauki humanistyczne
- Pedagogika
- Pomoce naukowe
- Popularnonaukowa
- Pozostałe
- Psychologia
- Socjologia
- Teatrologia
- Teologia
- Teorie i nauki ekonomiczne
- Transport i spedycja
- Wychowanie fizyczne
- Zarządzanie i marketing
-
Poradniki
-
Poradniki do gier
-
Poradniki zawodowe i specjalistyczne
-
Prawo
- BHP
- Historia
- Kodeks drogowy. Prawo jazdy
- Nauki prawne
- Ochrona zdrowia
- Ogólne, kompendium wiedzy
- Podręczniki akademickie
- Pozostałe
- Prawo budowlane i lokalowe
- Prawo cywilne
- Prawo finansowe
- Prawo gospodarcze
- Prawo gospodarcze i handlowe
- Prawo karne
- Prawo karne. Przestępstwa karne. Kryminologia
- Prawo międzynarodowe
- Prawo międzynarodowe i zagraniczne
- Prawo ochrony zdrowia
- Prawo oświatowe
- Prawo podatkowe
- Prawo pracy i ubezpieczeń społecznych
- Prawo publiczne, konstytucyjne i administracyjne
- Prawo rodzinne i opiekuńcze
- Prawo rolne
- Prawo socjalne, prawo pracy
- Prawo Unii Europejskiej
- Przemysł
- Rolne i ochrona środowiska
- Słowniki i encyklopedie
- Zamówienia publiczne
- Zarządzanie
-
Przewodniki i podróże
- Afryka
- Albumy
- Ameryka Południowa
- Ameryka Środkowa i Północna
- Australia, Nowa Zelandia, Oceania
- Austria
- Azja
- Bałkany
- Bliski Wschód
- Bułgaria
- Chiny
- Chorwacja
- Czechy
- Egipt
- Europa
- Francja
- Góry
- Grecja
- Hiszpania
- Holandia
- Islandia
- Litwa
- Mapy, Plany miast, Atlasy
- Miniprzewodniki
- Niemcy
- Podróże aktywne
- Polska
- Portugalia
- Pozostałe
- Rosja
- Rumunia
- Słowacja
- Słowenia
- Szwecja
- Świat
- Turcja
- Ukraina
- Węgry
- Wielka Brytania
- Włochy
-
Psychologia
- Filozofie życiowe
- Komunikacja międzyludzka
- Mindfulness
- Ogólne
- Perswazja i NLP
- Psychologia akademicka
- Psychologia duszy i umysłu
- Psychologia pracy
- Relacje i związki
- Rodzicielstwo i psychologia dziecka
- Rozwiązywanie problemów
- Rozwój intelektualny
- Sekret
- Seksualność
- Uwodzenie
- Wygląd i wizerunek
- Życiowe filozofie
-
Religia
-
Sport, fitness, diety
-
Technika i mechanika
-
Biznes i ekonomia
- Bitcoin
- Bizneswoman
- Coaching
- E-biznes
- Ekonomia
- Finanse
- Giełda i inwestycje
- Kompetencje osobiste
- Komunikacja i negocjacje
- Mała firma
- Marketing
- Motywacja
- Nieruchomości
- Perswazja i NLP
- Poradniki
- Prezentacje
- Przywództwo
- Public Relation
- Sekret
- Social Media
- Sprzedaż
- Start-up
- Twoja kariera
- Zarządzanie
- Zarządzanie projektami
- Zasoby ludzkie (HR)
-
Dla dzieci
-
Dla młodzieży
-
Edukacja
-
Encyklopedie, słowniki
-
Historia
-
Informatyka
-
Inne
-
Języki obce
-
Kultura i sztuka
-
Lektury szkolne
-
Literatura
- Antologie
- Ballada
- Dla dorosłych
- Dramat
- Dzienniki, pamiętniki, listy
- Epos, epopeja
- Esej
- Fantastyka i science-fiction
- Felietony
- Fikcja
- Humor, satyra
- Inne
- Klasyczna
- Kryminał
- Literatura faktu
- Literatura piękna
- Nobliści
- Nowele
- Obyczajowa
- Opowiadania
- Pamiętniki
- Podróże
- Poezja
- Polityka
- Popularnonaukowa
- Powieść
- Powieść historyczna
- Proza
- Przygodowa
- Publicystyka
- Reportaż
- Romans i literatura obyczajowa
- Sensacja
- Thriller, Horror
- Wywiady i wspomnienia
-
Nauki przyrodnicze
-
Nauki społeczne
-
Popularnonaukowe i akademickie
-
Poradniki
-
Prawo
-
Przewodniki i podróże
-
Psychologia
- Filozofie życiowe
- Komunikacja międzyludzka
- Mindfulness
- Ogólne
- Perswazja i NLP
- Psychologia akademicka
- Psychologia duszy i umysłu
- Psychologia pracy
- Relacje i związki
- Rodzicielstwo i psychologia dziecka
- Rozwiązywanie problemów
- Rozwój intelektualny
- Sekret
- Seksualność
- Uwodzenie
- Wygląd i wizerunek
- Życiowe filozofie
-
Religia
-
Sport, fitness, diety
-
Bazy danych
-
Big Data
-
Biznes i ekonomia
-
Cyberbezpieczeństwo
-
Data Science
-
DevOps
-
Dla dzieci
-
Elektronika
-
Grafika/Wideo/CAX
-
Gry
-
Microsoft Office
-
Narzędzia programistyczne
-
Programowanie
-
Rozwój osobisty
-
Sieci komputerowe
-
Systemy operacyjne
-
Testowanie oprogramowania
-
Urządzenia mobilne
-
UX/UI
-
Web development
Creating top-notch software is an extremely difficult undertaking. Developers researching the subject have difficulty determining which advice is up to date and which approaches have already been replaced by easier, better practices. At the same time, most online resources offer limited explanation, while also lacking the proper context and structure.
This book offers a simpler, more comprehensive, experience as it treats the subject of building C++ solutions holistically. Modern CMake for C++ is an end-to-end guide to the automatization of complex tasks, including building, testing, and packaging. You'll not only learn how to use the CMake language in CMake projects, but also discover what makes them maintainable, elegant, and clean. The book also focuses on the structure of source directories, building targets, and packages. As you progress, you'll learn how to compile and link executables and libraries, how those processes work, and how to optimize builds in CMake for the best results. You'll understand how to use external dependencies in your project - third-party libraries, testing frameworks, program analysis tools, and documentation generators. Finally, you'll get to grips with exporting, installing, and packaging for internal and external purposes.
By the end of this book, you'll be able to use CMake confidently on a professional level.
- Modern CMake for C++
- Contributors
- About the author
- About the reviewers
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Share Your Thoughts
- Section 1: Introducing CMake
- Chapter 1: First Steps with CMake
- Technical requirements
- Understanding the basics
- What is CMake?
- How does it work?
- Installing CMake on different platforms
- Docker
- Windows
- Linux
- macOS
- Building from the source
- Mastering the command line
- CMake
- CTest
- CPack
- The CMake GUI
- CCMake
- Navigating the project files
- The source tree
- The build tree
- Listfiles
- CMakeLists.txt
- CMakeCache.txt
- The Config-files for packages
- The cmake_install.cmake, CTestTestfile.cmake, and CPackConfig.cmake files
- CMakePresets.json and CMakeUserPresets.json
- Ignoring files in Git
- Discovering scripts and modules
- Scripts
- Utility modules
- Find-modules
- Summary
- Further reading
- Chapter 2: The CMake Language
- Technical requirements
- The basics of the CMake Language syntax
- Comments
- Command invocations
- Command arguments
- Working with variables
- Variable references
- Using the environment variables
- Using the cache variables
- How to correctly use the variable scope in CMake
- Using lists
- Understanding control structures in CMake
- Conditional blocks
- Loops
- Command definitions
- Useful commands
- The message() command
- The include() command
- The include_guard() command
- The file() command
- The execute_process() command
- Summary
- Further reading
- Chapter 3: Setting Up Your First CMake Project
- Technical requirements
- Basic directives and commands
- Specifying the minimum CMake version cmake_minimum_required()
- Defining languages and metadata project()
- Partitioning your project
- Scoped subdirectories
- Nested projects
- External projects
- Thinking about the project structure
- Scoping the environment
- Discovering the operating system
- Cross-compilation what are host and target systems?
- Abbreviated variables
- Host system information
- Does the platform have 32-bit or 64-bit architecture?
- What is the endianness of the system?
- Configuring the toolchain
- Setting the C++ standard
- Insisting on standard support
- Vendor-specific extensions
- Interprocedural optimization
- Checking for supported compiler features
- Compiling a test file
- Disabling in-source builds
- Summary
- Further reading
- Section 2: Building With CMake
- Chapter 4: Working with Targets
- Technical requirements
- The concept of a target
- Dependency graph
- Visualizing dependencies
- Target properties
- What are transitive usage requirements?
- Dealing with conflicting propagated properties
- Meet the pseudo targets
- Build targets
- Writing custom commands
- Using a custom command as a generator
- Using a custom command as a target hook
- Understanding generator expressions
- General syntax
- Types of evaluation
- Examples to try out
- Summary
- Further reading
- Chapter 5: Compiling C++ Sources with CMake
- Technical requirements
- The basics of compilation
- How compilation works
- Initial configuration
- Managing sources for targets
- Preprocessor configuration
- Providing paths to included files
- Preprocessor definitions
- Configuring the headers
- Configuring the optimizer
- General level
- Function inlining
- Loop unrolling
- Loop vectorization
- Managing the process of compilation
- Reducing compilation time
- Finding mistakes
- Summary
- Further reading
- Chapter 6: Linking with CMake
- Technical requirements
- Getting the basics of linking right
- Building different library types
- Static libraries
- Shared libraries
- Shared modules
- Position-independent code
- Solving problems with the One Definition Rule
- Dynamically linked duplicated symbols
- Use namespaces dont count on a linker
- The order of linking and unresolved symbols
- Separating main() for testing
- Summary
- Further reading
- Chapter 7: Managing Dependencies with CMake
- Technical requirements
- How to find installed packages
- Discovering legacy packages with FindPkgConfig
- Writing your own find-modules
- Working with Git repositories
- Providing external libraries through Git submodules
- Git-cloning dependencies for projects that don't use Git
- Using ExternalProject and FetchContent modules
- ExternalProject
- FetchContent
- Summary
- Further reading
- Section 3: Automating With CMake
- Chapter 8: Testing Frameworks
- Technical requirements
- Why are automated tests worth the trouble?
- Using CTest to standardize testing in CMake
- Build-and-test mode
- Test mode
- Creating the most basic unit test for CTest
- Structuring our projects for testing
- Unit-testing frameworks
- Catch2
- GTest
- GMock
- Generating test coverage reports
- Avoiding the SEGFAULT gotcha
- Summary
- Further reading
- Chapter 9: Program Analysis Tools
- Technical requirements
- Enforcing the formatting
- Using static checkers
- Clang-Tidy
- Cpplint
- Cppcheck
- include-what-you-use
- Link what you use
- Dynamic analysis with Valgrind
- Memcheck
- Memcheck-Cover
- Summary
- Further reading
- Chapter 10: Generating Documentation
- Technical requirements
- Adding Doxygen to your project
- Generating documentation with a modern look
- Summary
- Further reading
- Other documentation generation utilities
- Chapter 11: Installing and Packaging
- Technical requirements
- Exporting without installation
- Installing projects on the system
- Installing logical targets
- Low-level installation
- Invoking scripts during installation
- Creating reusable packages
- Understanding the issues with relocatable targets
- Installing target export files
- Writing basic config-files
- Creating advanced config-files
- Generating package version files
- Defining components
- How to use components in find_package()
- How to use components in the install() command
- Packaging with CPack
- Summary
- Further reading
- Chapter 12: Creating Your Professional Project
- Technical requirements
- Planning our work
- Project layout
- Object libraries
- Shared libraries versus static libraries
- Project file structure
- Building and managing dependencies
- Building the Calc library
- Building the Calc Console executable
- Testing and program analysis
- Preparing the coverage module
- Preparing the Memcheck module
- Applying testing scenarios
- Adding static analysis tools
- Installing and packaging
- Installation of the library
- Installation of the executable
- Packaging with CPack
- Providing the documentation
- Automatic documentation generation
- Not-as-technical documents of professional project
- Summary
- Further reading
- Appendix: Miscellaneous Commands
- The string() command
- Search and replace
- Manipulation
- Comparison
- Hashing
- Generation
- JSON
- The list() command
- Reading
- Searching
- Modification
- Ordering
- The file() command
- Reading
- Writing
- Filesystem
- Path conversion
- Transfer
- Locking
- Archiving
- The math() command
- Why subscribe?
- The string() command
- Other Books You May Enjoy
- Packt is searching for authors like you
- Share Your Thoughts
- Tytuły: Modern CMake for C++
- Autor: Rafał Świdziński
- Tytuł oryginału: Modern CMake for C++
- ISBN Ebooka: 9781801071659, 9781801071659
- Data wydania: 2022-02-28
- Identyfikator pozycji: e_2t28
- Kategorie:
- Wydawca: Packt Publishing