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,864
    • Issues 3,864
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • 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
  • Issues
  • #16510
Closed
Open
Created Dec 15, 2016 by Johan Hattne@hattne

FindCUDA: nvcc fails when COMPILE_DEFINITIONS contains string-valued definition

Adding a COMPILE_DEFINITION with e.g. add_definitions(-DFOO="BAR BAZ") does what I would expect, in that the compiler is called with -DFOO="\"BAR BAZ\"". It does not work so well with nvcc however, which instead sees -DFOO= -DBAR -DBAZ\" on which it subsequently croaks owing to the stray double quote. Removing the quotes in the set(CUDA_NVCC_INCLUDE_DIRS "@CUDA_NVCC_INCLUDE_DIRS@") line in run_nvcc.cmake solves the issue at hand in spite of the comment stating that it "needs to be quoted to handle spaces properly"; I do suppose this introduces breakage elsewhere that I'm just not aware of.

This may very well be a PEBKAC at my end, but I haven't been able to figure this out after trawling through the documentation and mailing lists.

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