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,226
    • Issues 3,226
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • 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
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #18008

Closed
Open
Opened May 18, 2018 by Alexander Korsunsky@akors

CUDA: Wrap `-pthread` flags into `-Xcompiler -pthread` for nvcc invocations

Using the finder module for Threads with CMAKE_THREAD_PREFER_PTHREAD=ON causes compilation of cuda objects to fail with the message:

nvcc fatal : Unknown option 'pthread'

This is because nvcc does not understand the option pthread. This should be able to be made to work by wrapping it in an -Xcompiler option.

As a user-side workaround this is a bit unsatisfactory, because dealing with -pthread flags is platform dependent, whereas the whole point of the the FindThreads module is to abstract away the platform dependency.

What would be great is if the native CUDA support in CMake could handle interactions with -pthread natively.

Related to #17929 (closed).

Maybe @robertmaynard is involved, maybe the maintainer of the FindThreads module

Edited May 18, 2018 by Alexander Korsunsky
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
3.13.0
Milestone
3.13.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#18008