The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build.
Use cmake_minimum_required to require CMake 3.0 or later, or CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. If CMake is 3. Make sure that you do one of the following things: If CMake version is less than 3.12, the if block will be true, and the policy will be set to the current CMake version. If you are using CMake and clang to target macOS there is a bug that can cause the CMAKE_CXX_STANDARD feature to simply not work (not add any compiler flags). CMake issue #15943 for clang users targeting macOS You can enable it in Tools > Options > CMake > General: Important Close and reopen the folder in Visual Studio to activate the integration. Enable CMakePresets.json integration in Visual Studio CMakePresets.json integration isn't enabled by default in Visual Studio. Then you could write use_cxx11() at the top of any CMakeLists.txt file that defines a target that uses C++11. We recommend using CMake version 3.14 or later. The macro only supports GCC right now, but it should be straight-forward to expand it to other compilers. If (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") If you need to support older versions of CMake, here is a macro I came up with that you can use: macro(use_cxx11) If you know that you will always have CMake 3.1 or later available, you can just write this in your top-level CMakeLists.txt file, or put it right before any new target is defined: set (CMAKE_CXX_STANDARD 11) CMake 3.1 introduced the CMAKE_CXX_STANDARD variable that you can use.