Skip to content
GitLab
  • Menu
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 3,930
    • Issues 3,930
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & 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
  • CMake
  • CMakeCMake
  • Merge requests
  • !5537

QNX: Do not disable compiler extensions for CMake itself

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Stephen Kelly requested to merge steveire/cmake:enable-extensions-on-qnx into master Nov 25, 2020
  • Overview 6
  • Commits 1
  • Pipelines 6
  • Changes 1

The set(CMAKE_CXX_EXTENSIONS FALSE) option has the effect of passing compile option -std=c++NN instead of -std=gnu++NN. On some platforms, the latter form (or the secondary effects that it has, such as setting _XOPEN_SOURCE) is required. This typically affects platforms such as mingw, cygwin and QNX. The GNU-like compiers default to -std=gnu++NN, which means that users can typically build source code on those platforms by default.

While the set(CMAKE_CXX_EXTENSIONS FALSE) option was set here in commit f034b0f6 (CMake compilation: do not use compiler extensions, 2020-03-14), the other changes in that commit added #defines which become required in the absense of use of -std=gnu++NN. However, only platforms regularly tested in the cmake dashboard were ported, as is reasonable. That made CMake fail to compile on QNX and perhaps other platforms which for which no one is submitting regular testing to the cmake dashboard.

Make the set(CMAKE_CXX_EXTENSIONS FALSE) option conditional on non-QNX to restore the QNX build.

Issue: #21503
Backport: release

Edited Nov 25, 2020 by Brad King
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: enable-extensions-on-qnx