Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

cloudhan/cmake-recipes

Repository files navigation

Just Some Notes

Simple Rules for Modern CMake

  1. Use command with target_ prefix whenever possible.

  2. Use find_package(Foo) for dependencies.

    2.1. Write FindFoo.cmake and add it to your cmake module path IF AND ONLY IF Foo is not a CMake project.

    2.2. Set Foo_ROOT when you place Foo in custom directory, this is just magic.

    2.3. To understand FindFoo.cmake, read CMake line by line - using a non-CMake library.

  3. Export your target.

Good Resource

  1. Build Systems: Combining CUDA and Modern CMake
  2. Modern CMake for Library Developers
  3. Effective CMake
  4. More Modern CMake: Working with CMake 3.12 and Later
  5. Deep CMake for Library Authors
  6. It's Time To Do CMake Right

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages