Do you have an old project that uses GNU autotools (autoconf, automake, libtool, etc.) to configure the build? Autotools are difficult to work with and don't support generating IDE projects. CMake provides better support for IDEs and is cross-platform.
This month, Richard Thomson will present a case study in converting a project from using autotools to using CMake. Some of the topics will include:
Creating a basic CMake build from the makefile
Replacing autoconf feature checks with CMake feature checks
Replacing autoconf generated sources with CMake generated sources
Relevant code:
Iterated Dynamics: https://github.com/LegalizeAdulthood/...
trn: https://github.com/LegalizeAdulthood/trn
Mash: https://github.com/marbl/Mash
Migrated Mash: https://github.com/LegalizeAdulthood/...
Utah C++ Programmers
Meetup: https://www.meetup.com/utah-cpp-progr...
Past topics: https://utahcpp.wordpress.com/past-me...
Future topics: https://utahcpp.wordpress.com/future-...
(Sorry, questioner audio wasn't included in the Q&A, so you only hear my answers.)
0:00:00 Introduction
0:00:30 A maze of twisty little unixes, all different
0:01:25 Early 1990s Unix Variants
0:03:15 Coping with Unix Variants
0:05:25 About Configure Scripts
0:06:35 GNU Coding Standards
0:08:17 Shared Libraries with Libtool
0:10:07 Autoconf Basics
0:12:19 Autotools Requirements
0:13:15 Basic Autoconf Usage
0:15:24 Autoconf and Automake Usage
0:16:01 Configuring a Package
0:16:43 Autotools Details
0:19:11 Autotools Weaknesses
0:25:12 Autotools Strengths
0:27:46 CMake: More Than Unix
0:29:22 CMake Basics
0:30:59 CMake Configuration Phase
0:32:16 Project Modeling with CMake
0:35:27 CMake Details
0:38:36 CMake Weaknesses
0:41:02 CMake Strengths
0:48:37 Migrating to CMake from Autotools
0:53:45 Managing Outstanding Work
0:54:55 Modeling Your Project
0:58:45 Configuring Your Project Incrementally
1:01:12 Config Interface Library
1:03:34 Migrating Libraries
1:05:59 Static or Shared Libraries?
1:07:56 Locating Header Files
1:10:39 Migrating the config.h.in Template
1:13:32 Migrating Executables
1:16:32 Lather, Rinse, Repeat
1:17:18 Any Left Over Junk?
1:18:35 Configuration Polish
1:20:37 Locating Third Party Libraries
1:26:57 Locating Symbols
1:27:44 Find Modules and Imported Targets
1:28:29 Custom Compile Checks
1:30:04 Custom Configure Logic
1:32:12 Moving from config.h Towards Features (1)
1:34:05 Moving from config.h Towards Features (2)
1:35:08 Moving from config.h Towards Features (3)
1:36:01 Moving from config.h Towards Features (4)
1:36:33 Code Generation & Custom Build Commands
1:36:55 Other Custom Stuff
1:37:31 Describing Tests
1:38:17 Installation and Packaging
1:38:56 Related Case Studies
1:39:45 Mash Example from Github
1:40:38 Original configure.ac
1:41:16 Makefile.in
1:41:48 Top-Level CMakeLists.txt
1:43:13 Specifying the C++ Standard
1:43:36 config Interface Library
1:48:36 libmash Library
1:55:27 mash Executable
2:02:20 Configuring fdio.h Feature Include
2:05:35 Q: What About Adding Go Language Support to CMake?