𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Professional CMake: A Practical Guide

✍ Scribed by Craig Scott


Year
2018
Tongue
English
Leaves
429
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


The handbook for every CMake user, providing structured learning, the latest best practices and real-world advice from one of the CMake co-maintainers.
Attempting to use any tool before understanding at least the basics of what it does and how it is meant to be used is most likely going to result in frustration. On the other hand, spending all one’s time learning the theory about something without getting hands-on makes for a rather boring experience and often leads to an overly idealistic understanding. This first part of the book follows a logical progression through CMake’s more fundamental features and concepts and is structured to enable the reader to immediately experiment and to do increasingly useful things with each chapter.
The goal is to incrementally build up the base knowledge needed to use CMake effectively, with an emphasis on being able to put that knowledge into practice right away. The initial focus in the first few chapters is on building a basic executable or library, covering just enough to give a new developer a quick introduction to CMake. Subsequent chapters expand that knowledge to demonstrate how to get the most out of what CMake has to offer. The techniques presented are aimed at real world use, with the intention of establishing good habits and teaching sound methods which scale to very large projects and can handle more complex scenarios. The later parts of the book all rely heavily on the material covered in this first part. Those who have already been using CMake for some time may find the topics relatively familiar, but the material also includes hard-won knowledge from real world projects and interaction with the CMake community. Even experienced users should find at least the Recommended Practices section at the end of each chapter to be a us

✦ Table of Contents


Professional CMake......Page 1
Table of Contents......Page 3
Preface......Page 10
Part I: Fundamentals......Page 12
Chapter 1. Introduction......Page 13
2.1. In-source Builds......Page 15
2.3. Generating Project Files......Page 16
2.4. Running The Build Tool......Page 17
2.5. Recommended Practices......Page 18
3.1. Managing CMake versions......Page 19
3.2. The project() Command......Page 21
3.4. Commenting......Page 22
3.5. Recommended Practices......Page 23
4.1. Executables......Page 24
4.2. Defining Libraries......Page 25
4.3. Linking Targets......Page 26
4.5. Old-style CMake......Page 28
4.6. Recommended Practices......Page 29
5.1. Variable Basics......Page 31
5.3. Cache Variables......Page 33
5.4. Manipulating Cache Variables......Page 35
5.4.1. Setting Cache Values On The Command Line......Page 36
5.4.2. CMake GUI Tools......Page 37
5.5. Debugging Variables And Diagnostics......Page 40
5.6. String Handling......Page 42
5.7. Lists......Page 44
5.9. Recommended Practices......Page 46
6.1.1. Basic Expressions......Page 48
6.1.3. Comparison Tests......Page 50
6.1.5. Existence Tests......Page 52
6.1.6. Common Examples......Page 54
6.2.1. foreach()......Page 55
6.2.2. while()......Page 56
6.2.3. Interrupting Loops......Page 57
6.3. Recommended Practices......Page 58
7.1. add_subdirectory()......Page 59
7.1.1. Source And Binary Directory Variables......Page 60
7.1.2. Scope......Page 61
7.2. include()......Page 63
7.3. Ending Processing Early......Page 65
7.4. Recommended Practices......Page 66
8.1. The Basics......Page 68
8.2. Argument Handling Essentials......Page 69
8.3. Keyword Arguments......Page 71
8.4. Scope......Page 74
8.5. Overriding Commands......Page 76
8.6. Recommended Practices......Page 77
9.1. General Property Commands......Page 79
9.2. Global Properties......Page 82
9.3. Directory Properties......Page 83
9.5. Source Properties......Page 84
9.6. Cache Variable Properties......Page 85
9.8. Recommended Practices......Page 86
Chapter 10. Generator Expressions......Page 88
10.1. Simple Boolean Logic......Page 89
10.2. Target Details......Page 91
10.3. General Information......Page 92
10.4. Recommended Practices......Page 93
Chapter 11. Modules......Page 95
11.1. Useful Development Aids......Page 96
11.3. Checking Existence And Support......Page 98
11.5. Recommended Practices......Page 103
12.1. Policy Control......Page 105
12.2. Policy Scope......Page 108
12.3. Recommended Practices......Page 109
Part II: Builds In Depth......Page 111
13.1. Build Type Basics......Page 112
13.1.2. Multiple Configuration Generators......Page 113
13.2. Common Errors......Page 114
13.3. Custom Build Types......Page 115
13.4. Recommended Practices......Page 119
14.1.1. Compiler Flags......Page 120
14.1.2. Linker Flags......Page 121
14.1.3. Target Property Commands......Page 122
14.2. Directory Properties And Commands......Page 125
14.3. Compiler And Linker Variables......Page 127
14.4. Recommended Practices......Page 131
15.1. Setting The Language Standard Directly......Page 133
15.2. Setting The Language Standard By Feature Requirements......Page 135
15.2.1. Detection And Use Of Optional Language Features......Page 137
15.3. Recommended Practices......Page 139
16.1. Executables......Page 141
16.2. Libraries......Page 142
16.4. Recommended Practices......Page 148
17.1. Custom Targets......Page 151
17.2. Adding Build Steps To An Existing Target......Page 153
17.3. Commands That Generate Files......Page 155
17.4. Configure Time Tasks......Page 158
17.5. Platform Independent Commands......Page 160
17.6. Combining The Different Approaches......Page 162
17.7. Recommended Practices......Page 164
18.1. Manipulating Paths......Page 165
18.2. Copying Files......Page 168
18.3. Reading And Writing Files Directly......Page 174
18.4. File System Manipulation......Page 178
18.5. Downloading And Uploading......Page 180
18.6. Recommended Practices......Page 182
19.1. Project Version......Page 184
19.2. Source Code Access To Version Details......Page 186
19.3. Source Control Commits......Page 189
19.4. Recommended Practices......Page 192
20.1. Build Basics......Page 194
20.3. Shared Library Versioning......Page 195
20.4. Interface Compatibility......Page 197
20.5. Symbol Visibility......Page 202
20.5.1. Specifying Default Visibility......Page 203
20.5.2. Specifying Individual Symbol Visibilities......Page 204
20.6. Mixing Static And Shared Libraries......Page 209
20.7. Recommended Practices......Page 212
Chapter 21. Toolchains And Cross Compiling......Page 214
21.1. Toolchain Files......Page 215
21.2. Defining The Target System......Page 216
21.3. Tool Selection......Page 217
21.4. System Roots......Page 219
21.5. Compiler Checks......Page 220
21.6.2. GCC With 32-bit Target On 64-bit Host......Page 221
21.6.3. Android......Page 222
21.7. Recommended Practices......Page 227
22.1. CMake Generator Selection......Page 228
22.2. Application Bundles......Page 229
22.3. Frameworks......Page 234
22.4. Loadable Bundles......Page 237
22.5. Build Settings......Page 238
22.6. Code Signing......Page 240
22.7. Creating And Exporting Archives......Page 242
22.8. Limitations......Page 244
22.9. Recommended Practices......Page 245
Part III: The Bigger Picture......Page 248
23.1. Finding Files And Paths......Page 249
23.1.2. Cross-compilation Controls......Page 253
23.3. Finding Programs......Page 255
23.4. Finding Libraries......Page 256
23.5. Finding Packages......Page 258
23.5.1. Package Registries......Page 264
23.5.2. FindPkgConfig......Page 266
23.6. Recommended Practices......Page 268
24.1. Defining And Executing A Simple Test......Page 272
24.2. Pass / Fail Criteria And Other Result Types......Page 275
24.3. Test Grouping And Selection......Page 278
24.4. Parallel Execution......Page 282
24.5. Test Dependencies......Page 284
24.7. Build And Test Mode......Page 287
24.8.1. Key CDash Concepts......Page 290
24.8.2. Executing Pipelines And Actions......Page 291
24.8.3. CTest Configuration......Page 293
24.8.4. Test Measurements And Results......Page 297
24.9. GoogleTest......Page 298
24.10. Recommended Practices......Page 303
Chapter 25. Installing......Page 306
25.1.1. Relative Layout......Page 307
25.1.2. Base Install Location......Page 309
25.2. Installing Targets......Page 311
25.2.1. Interface Properties......Page 316
25.2.2. RPATH......Page 317
25.2.3. Apple-specific Targets......Page 320
25.3. Installing Exports......Page 323
25.4. Installing Files And Directories......Page 326
25.5. Custom Install Logic......Page 329
25.6. Installing Dependencies......Page 330
25.7. Writing A Config Package File......Page 331
25.7.1. Config Files For CMake Projects......Page 332
25.7.2. Config Files For Non-CMake Projects......Page 339
25.8. Recommended Practices......Page 340
26.1. Packaging Basics......Page 343
26.2. Components......Page 348
26.3. Multi Configuration Packages......Page 352
26.4. Package Generators......Page 353
26.4.1. Simple Archives......Page 354
26.4.2. Qt Installer Framework (IFW)......Page 356
26.4.3. WIX......Page 361
26.4.4. NSIS......Page 362
26.4.5. DragNDrop......Page 364
26.4.6. productbuild......Page 365
26.4.7. RPM......Page 366
26.4.8. DEB......Page 371
26.5. Recommended Practices......Page 372
27.1. ExternalProject......Page 375
27.1.1. Tour Of Main Features......Page 376
27.1.2. Step Management......Page 382
27.1.3. Miscellaneous Features......Page 385
27.1.4. Common Issues......Page 387
27.2. FetchContent......Page 389
27.2.1. Developer Overrides......Page 393
27.2.2. Other Uses For FetchContent......Page 394
27.2.3. Restrictions......Page 395
27.3. ExternalData......Page 396
27.4. Recommended Practices......Page 397
28.1. Superbuild Structure......Page 399
28.2. Non-superbuild Structure......Page 401
28.3. Common Top Level Subdirectories......Page 405
28.4. IDE Projects......Page 406
28.5. Defining Targets......Page 409
28.5.1. Target Sources......Page 410
28.5.2. Target Outputs......Page 413
28.5.3. Windows Specific Issues......Page 415
28.6. Miscellaneous Project Features......Page 416
28.7. Recommended Practices......Page 418
Index......Page 422


πŸ“œ SIMILAR VOLUMES


Professional CMake: A Practical Guide
✍ Craig Scott πŸ“‚ Library πŸ“… 2022 🌐 English

Professional CMake: A Practical Guide is the handbook for every CMake user, from beginner to seasoned veteran. It contains hundreds of pages of real-world advice, best practices and insights gained from production projects and interaction with the CMake community. Topics cover the complete softwa

Professional CMake: A Practical Guide
✍ Craig Scott πŸ“‚ Library πŸ“… 2023 πŸ› Crascit Pty Ltd 🌐 English

The handbook for every CMake user, providing structured learning, the latest best practices and real-world advice from one of the CMake co-maintainers.

Professional CMake: A Practical Guide
✍ Craig Scott πŸ“‚ Library πŸ“… 0 🌐 English

The initial focus in the first few chapters is on building a basic executable or library, covering just enough to give a new developer a quick introduction to CMake. Subsequent chapters expand that knowledge to demonstrate how to get the most out of what CMake has to offer. The techniques present

Insolvency Law Professional Practice Gui
✍ Anne-Marie Mooney Cotter πŸ“‚ Library πŸ“… 2003 🌐 English

This "Insolvency Professional Practice Guide" is designed to give apprentice solicitors a clear and thorough understanding of the current insolvency practice and procedure. In particular, it will delve more intensely into the many areas of Insolvency, such as personal insolvency, company insolvency,

Reflective practice for healthcare profe
✍ Beverley Joan Taylor πŸ“‚ Library πŸ“… 2010 πŸ› Open University Press 🌐 English

This popular book provides practical guidance for healthcare professionals wishing to reflect on their work and improve the way they undertake clinical procedures, interact with other people at work and deal with power issues. Front cover; Half title; Title page; Copyright page; Dedication; Cont

Reflective practice for healthcare profe
✍ Taylor, Beverley Joan πŸ“‚ Library πŸ“… 2010 πŸ› McGraw-Hill/Open University Press 🌐 English

This popular book provides practical guidance for healthcare professionals wishing to reflect on their work and improve the way they undertake clinical procedures, interact with other people at work and deal with power issues.</div> <br> Abstract: <div class="showMoreLessReadmore">