Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 2,684
    • Issues 2,684
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 19
    • Merge Requests 19
  • Packages
    • Packages
    • Container Registry
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #20036

Closed
Open
Opened Nov 27, 2019 by Théo DELRIEU@theodelrieu
  • Report abuse
  • New issue
Report abuse New issue

Darwin version detection should rely on CMAKE_HOST_SYSTEM_VERSION

Hello, I've updated to CMake 3.14 lately, and my cross-build workflow has been broken by the new Platform/Darwin.cmake file.

The following lines result in CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG not being defined, and thus breaking shared library builds:

string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_SYSTEM_VERSION}")
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\2" DARWIN_MINOR_VERSION "${CMAKE_SYSTEM_VERSION}")

It seems to me that CMAKE_HOST_SYSTEM_VERSION should be used instead.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: cmake/cmake#20036