diff --git a/.github/template/template_name b/.github/template/template_name index 9f9b489e..b4857fcb 100644 --- a/.github/template/template_name +++ b/.github/template/template_name @@ -1 +1 @@ -cpp_boilerplate_project +cmake_conan_boilerplate_template diff --git a/.github/template/template_repository b/.github/template/template_repository index 622fb5a7..efbdeb18 100644 --- a/.github/template/template_repository +++ b/.github/template/template_repository @@ -1 +1 @@ -cpp-best-practices/cpp_boilerplate_project +cpp-best-practices/cmake_conan_boilerplate_template diff --git a/CMakeLists.txt b/CMakeLists.txt index f887d73d..70b75f2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16...3.23) +cmake_minimum_required(VERSION 3.18...3.23) # Not ideal to use this global variable, but necessary to make sure # that tooling and projects use the same version @@ -103,7 +103,7 @@ dynamic_project_options( PCH_HEADERS # This is a list of headers to pre-compile, here are some common ones - ENABLE_CONAN + ENABLE_CONAN # Use Conan for package management # CONAN_OPTIONS # Extra options to pass to conan # MSVC_WARNINGS # Override the defaults for the MSVC warnings # CLANG_WARNINGS # Override the defaults for the CLANG warnings diff --git a/README.md b/README.md index 860389e3..8b9af443 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# cpp_boilerplate_project +# cmake_conan_boilerplate_template -[![ci](https://github.com/cpp-best-practices/cpp_boilerplate_project/actions/workflows/ci.yml/badge.svg)](https://github.com/cpp-best-practices/cpp_boilerplate_project/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/cpp-best-practices/cpp_boilerplate_project/branch/main/graph/badge.svg)](https://codecov.io/gh/cpp-best-practices/cpp_boilerplate_project) -[![Language grade: C++](https://img.shields.io/lgtm/grade/cpp/github/cpp-best-practices/cpp_boilerplate_project)](https://lgtm.com/projects/g/cpp-best-practices/cpp_boilerplate_project/context:cpp) -[![CodeQL](https://github.com/cpp-best-practices/cpp_boilerplate_project/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cpp-best-practices/cpp_boilerplate_project/actions/workflows/codeql-analysis.yml) +[![ci](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/ci.yml/badge.svg)](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/cpp-best-practices/cmake_conan_boilerplate_template/branch/main/graph/badge.svg)](https://codecov.io/gh/cpp-best-practices/cmake_conan_boilerplate_template) +[![Language grade: C++](https://img.shields.io/lgtm/grade/cpp/github/cpp-best-practices/cmake_conan_boilerplate_template)](https://lgtm.com/projects/g/cpp-best-practices/cmake_conan_boilerplate_template/context:cpp) +[![CodeQL](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/codeql-analysis.yml) -## About cpp_boilerplate_project +## About cmake_conan_boilerplate_template This is a C++ Best Practices GitHub template for getting up and running with C++ quickly. @@ -36,7 +36,7 @@ Ths Boilerplate project will merge new features first, then they will be merged ### Use the Github template First, click the green `Use this template` button near the top of this page. -This will take you to Github's ['Generate Repository'](https://github.com/cpp-best-practices/cpp_boilerplate_project/generate) page. +This will take you to Github's ['Generate Repository'](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/generate) page. Fill in a repository name and short description, and click 'Create repository from template'. This will allow you to create a new repository in your Github account, prepopulated with the contents of this project. diff --git a/README_dependencies.md b/README_dependencies.md index 51bc71a6..6917b056 100644 --- a/README_dependencies.md +++ b/README_dependencies.md @@ -29,21 +29,30 @@ RefreshEnv.cmd # reload the environment ``` ### Necessary Dependencies -1. A C++ compiler that supports C++17. +1. A C++ compiler that supports C++20. See [cppreference.com](https://en.cppreference.com/w/cpp/compiler_support) to see which features are supported by each compiler. The following compilers should work: - * [gcc 7+](https://gcc.gnu.org/) + * [gcc 11+](https://gcc.gnu.org/)
Install command - - Debian/Ubuntu: + - Ubuntu 21.04+: + + sudo apt install gcc-11 - sudo apt install build-essential + - Ubuntu 18.04-20.04: + + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update -qq + sudo apt install gcc-11 - Windows: + The most popular Windows port of `gcc` is `mingw`, which you can install with `choco`. + Please be aware that `mingw` is not officially supported by this project, owing to numerous + longstanding bugs. Use it at your own risk. + choco install mingw -y - MacOS: @@ -51,7 +60,7 @@ The following compilers should work: brew install gcc
- * [clang 6+](https://clang.llvm.org/) + * [clang 13+](https://clang.llvm.org/)
Install command @@ -107,10 +116,15 @@ The following compilers should work:
Install Command - - Via pip - https://docs.conan.io/en/latest/installation.html#install-with-pip-recommended + - Via pip (requires Python 3.5+) - https://docs.conan.io/en/latest/installation.html#install-with-pip-recommended pip install --user conan + Over time, you may need to upgrade Conan to maintain compatibility with the latest packages. + You can do that with: + + pip install --user --upgrade conan + - Windows: choco install conan -y @@ -121,13 +135,19 @@ The following compilers should work:
-3. [CMake 3.15+](https://cmake.org/) +3. [CMake 3.18+](https://cmake.org/)
Install Command - - Debian/Ubuntu: + - All platforms (if you have Python installed): + + pip install --user cmake - sudo apt-get install cmake + - Ubuntu 21.04 or later: + + sudo apt-get install cmake cmake-curses-gui + + - Ubuntu 16.04-20.04: Follow instructions at [Kitware](https://apt.kitware.com/) - Windows: @@ -139,7 +159,7 @@ The following compilers should work:
-### Optional Dependencies +### Strongly Recommended (but optional) Dependencies #### C++ Tools * [Doxygen](http://doxygen.nl/)
@@ -209,28 +229,3 @@ The following compilers should work: https://github.com/include-what-you-use/include-what-you-use#how-to-install
-#### GUI libraries -This project can be made to work with several optional GUI frameworks. - -If desired, you should install the following optional dependencies as -directed by their documentation, linked here: - -- [FLTK](https://www.fltk.org/doc-1.4/index.html) -- [GTKMM](https://www.gtkmm.org/en/documentation.html) -- [QT](https://doc.qt.io/) - -The following dependencies can be downloaded automatically by CMake and Conan. -All you need to do to install them is to turn on a CMake flag during -configuration. -If you run into difficulty using them, please refer to their documentation, -linked here: - -- [NANA](http://nanapro.org/en-us/documentation/) -- [SDL](http://wiki.libsdl.org/FrontPage) -- [IMGUI](https://github.com/ocornut/imgui/tree/master/docs): - This framework depends on SFML, and if you are using Linux, you may need - to install several of SFML's dependencies using your package manager. See - [the SFML build tutorial](https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php) - for specifics. - -