Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,195
    • Issues 3,195
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Merge Requests
  • !5537

Merged
Opened Nov 25, 2020 by Stephen Kelly@steveireDeveloper

QNX: Do not disable compiler extensions for CMake itself

  • 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
3.19.2
Milestone
3.19.2 (Past due)
Assign milestone
Time tracking
Reference: cmake/cmake!5537
Source branch: enable-extensions-on-qnx

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.