Back
Close

Introduction to cmake

raphaelmeyer
3,693 views
Previous: Functions (Solution)

You did it!

Some Final Words

Does:

  • Use the commands
    • target_include_directories
    • target_link_libraries
    • target_compile_definitions
    • target_compile_features
    • target_compile_options
  • Always set cmake_minimum_required
  • Use PRIVATE, INTERFACE and PUBLIC
  • Use namespaced alias targets

Don'ts:

  • Do NOT use
    • add_compile_options
    • add_definitions
    • include_directories
    • link_directories
    • link_libraries
  • Never ever use set(CMAKE_...)

Resources

Effective CMake by Daniel Pfeifer at C++Now 2017

Using Modern CMakePatterns to Enforce a Good Modular Design by Mathieu Ropert

Embracing Modern CMake by Stephen Kelly

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants