Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,106
    • Issues 4,106
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #20521
Closed
Open
Issue created Mar 30, 2020 by Viacheslav Chernyshev@v-chernyshev

XLC C++ should not declare full C++11 and C++14 support

Operating system: AIX 7.1.

Compiler version:

bash-4.3$ ./xlC -qversion
IBM XL C/C++ for AIX, V16.1.0  (5725-C72, 5765-J12)
Version: 16.01.0000.0004

Hey guys,

We have recently started an attempt to upgrade the AIX compiler used at our company to version 16.1.0 and it has revealed that CMake is too eager to declare that this compiler has full support for the C++11 and C++14 features. To give a tiny example, this C++ file:

struct Dummy
{
    void something() noexcept {}
};

int main(int, char**)
{
    return 0;
}

Does not compile when I request cxx_std_11 via target_compile_features (CMake passes -qlanglvl=extended0x):

"test.cpp", line 3.22: 1540-0063 (S) The text "noexcept" is unexpected.

It's even worse when I request cxx_std_14 though because then CMake passes -qlanglvl=extended1y which is, apparently, not a valid compiler flag:

1540-5200 (W) The option "langlvl=extended1y" is not supported.
"test.cpp", line 3.22: 1540-0063 (S) The text "noexcept" is unexpected.

As far as I'm aware, no version of XLC has full support for C++11 and C++14, so CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT and CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT cannot be set to ON. Probably it should follow the same individual feature detection model as SunPro-CXX-FeatureTests.cmake?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking