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

Fix build with NVHPC #1323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davschneller
Copy link

@davschneller davschneller commented Oct 11, 2024

Exclude all warning-emitting flags if building as main project with the NVHPC compiler (effectively making it take the same exception as for MSVC there).

Otherwise, the build will fail right now, due to NVHPC not recognizing all the specified compiler options. Cf. the following snippet which runs CMake and attempts to build yaml-cpp 0.8.0:

$ cmake ..
-- The CXX compiler identification is NVHPC 24.7.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /[...]/24.7/compilers/bin/nvc++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.8s)
-- Generating done (1.1s)
-- Build files have been written to: /[...]/yaml-cpp/build
$ make
[  2%] Building CXX object CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.o
nvc++-Error-Unknown switch: -Weffc++
nvc++-Error-Unknown switch: -pedantic-errors
make[2]: *** [CMakeFiles/yaml-cpp.dir/build.make:76: CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:861: CMakeFiles/yaml-cpp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

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

Successfully merging this pull request may close these issues.

1 participant