Repository navigation
Support C++23 #756
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Activity
I want to fix this before releasing v0.26.0. Probably a good idea to support C++23 and C++26?
I don't find the linked code in the current CMake master
static std::map<std::string, std::vector<std::string>> langStdMap;
if (langStdMap.empty()) {
// Maintain sorted order, most recent first.
langStdMap["CXX"].emplace_back("20");
langStdMap["CXX"].emplace_back("17");
langStdMap["CXX"].emplace_back("14");
langStdMap["CXX"].emplace_back("11");
langStdMap["CXX"].emplace_back("98");
langStdMap["C"].emplace_back("11");
langStdMap["C"].emplace_back("99");
langStdMap["C"].emplace_back("90");
langStdMap["CUDA"].emplace_back("14");
langStdMap["CUDA"].emplace_back("11");
langStdMap["CUDA"].emplace_back("98");
}Maybe we can remove the handling in Hunter as well?
edit: codeblock removed in Kitware/CMake@56cf509
Currently the list is found in https://github.com/Kitware/CMake/blob/v4.0.1/Source/cmStandardLevelResolver.cxx#L491-L517
std::unordered_map<std::string,
StandardLevelComputer> const StandardComputerMapping = {
{ "C",
StandardLevelComputer{
"C", std::vector<int>{ 90, 99, 11, 17, 23 },
std::vector<std::string>{ "90", "99", "11", "17", "23" } } },
{ "CXX",
StandardLevelComputer{
"CXX", std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
std::vector<std::string>{ "98", "11", "14", "17", "20", "23", "26" } } },
{ "CUDA",
StandardLevelComputer{
"CUDA", std::vector<int>{ 03, 11, 14, 17, 20, 23, 26 },
std::vector<std::string>{ "03", "11", "14", "17", "20", "23", "26" } } },
{ "OBJC",
StandardLevelComputer{
"OBJC", std::vector<int>{ 90, 99, 11, 17, 23 },
std::vector<std::string>{ "90", "99", "11", "17", "23" } } },
{ "OBJCXX",
StandardLevelComputer{
"OBJCXX", std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
std::vector<std::string>{ "98", "11", "14", "17", "20", "23", "26" } } },
{ "HIP",
StandardLevelComputer{
"HIP", std::vector<int>{ 98, 11, 14, 17, 20, 23, 26 },
std::vector<std::string>{ "98", "11", "14", "17", "20", "23", "26" } } }
};edit2: use tag link instead of commit permalink for StandardLevelComputerMapping
added a commit that references this issue on Apr 29, 2025
added a commit that references this issue on Apr 29, 2025
added a commit that references this issue on Mar 13, 2026
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
When we set CXX_standards as 23, hunter raise this error
[hunter ** INTERNAL **] CXX standard 23 not known
I wonder expected CXX_standard is set in below, we should just add 23?
hunter/cmake/modules/hunter_get_lang_standard_flag.cmake
it has a comment pointing to a specific version of CMake but not sure where the version is from.