Skip to content

[BUG] Visual studio fails to compile unit tests/examples #153

@akfite

Description

@akfite

Describe the bug
CMake generates a solution that fails to compile 11 of 20 projects on VS2022.

From #147 :

The problem is not that nvcc is being passed an incorrect flag, but rather that fvisibility is not valid on VS. We use the option -forward-unknown-to-host-compiler, so any unknown parameter (of which this is one), nvcc will automatically forward to VS.

To Reproduce
Steps to reproduce the behavior:

cmake -DMATX_BUILD_TESTS=ON -DMATX_BUILD_BENCHMARKS=ON -DMATX_BUILD_EXAMPLES=ON -DMATX_BUILD_DOCS=OFF -DCMAKE_CUDA_ARCHITECTURES=52 -DCMAKE_BUILD_TYPE=Debug ..

Expected behavior
Expect to successfully compile all unit tests & examples.

Code snippers
output log attached.

System details (please complete the following information):

  • Windows 10 Pro
  • CMake 3.22.1
  • VS2022 (MSVC 19.30.30706.0)
  • CUDA 11.6
  • pybind11 2.6.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions