Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvcc fails due to -Wno-unknown-pragmas flag set in bench/CMakeLists.txt #640

Closed
dqwu opened this issue Nov 8, 2024 · 0 comments
Closed

Comments

@dqwu
Copy link

dqwu commented Nov 8, 2024

When building c-blosc2 with nvcc, the build fails due to the -Wno-unknown-pragmas flag being applied in bench/CMakeLists.txt for the sum_openmp target. nvcc does not recognize this flag, causing the build to fail with the following error:
nvc-Error-Unknown switch: -Wno-unknown-pragmas

Possible Solution

Modify bench/CMakeLists.txt to apply the -Wno-unknown-pragmas flag only when using gcc by adding the following conditional check:

if(UNIX)
    # Avoid a warning when using gcc without -fopenmp
  if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
    target_compile_options(sum_openmp PRIVATE "-Wno-unknown-pragmas")
  endif()
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant