Skip to content

Build failure on Ubuntu 24.04 (GCC 13.3.0) cuda13.1: "target_compile_features no known features" #402

@haswelliris

Description

@haswelliris

Description
I am unable to build cuda-samples on a fresh installation of Ubuntu 24.04. When running CMake, the configuration fails with target_compile_features no known features for CXX compiler "GNU" version 13.3.0 across multiple samples (e.g., cudaGraphsPerfScaling, transpose).

It appears that CMake is failing to map the feature set for GCC 13.3.0 when the project languages are mixed with CUDA, or the C++ standard detection is failing during the initial compiler check.

Environment

  • OS: Ubuntu 24.04 LTS
  • Compiler: GCC / G++ 13.3.0
  • CUDA Toolkit: 13.1 (Targeting architecture sm_90)
  • CMake: 3.28.3

Steps to Reproduce

  1. Clone the repository.
  2. mkdir build && cd build
  3. Run cmake .. -DCMAKE_CUDA_ARCHITECTURES=90 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-13.1/bin/nvcc

Generates Error

CMake Error at Samples/6_Performance/transpose/CMakeLists.txt:28 (target_compile_features): 
  target_compile_features no known features for CXX compiler

  "GNU" 

  version 13.3.0.

Attempted Fixes

  • I have tried forcing CMAKE_CXX_STANDARD=17 via command line arguments.

It seems that despite enabling the CXX language, CMake cannot retrieve the compile features list for this specific GCC version when invoked within this project structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions