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 issue because -std=c++11 appears twice #2489

Closed
atrantan opened this issue Feb 7, 2017 · 3 comments
Closed

nvcc issue because -std=c++11 appears twice #2489

atrantan opened this issue Feb 7, 2017 · 3 comments

Comments

@atrantan
Copy link

atrantan commented Feb 7, 2017

Got this compilation error nvcc fatal : redefinition of argument 'std' when compiling cuda examples with nvcc. I think it is related to that commit 11e29e0

@biddisco
Copy link
Contributor

biddisco commented Feb 8, 2017

hpx adds -std=c++11 to your flags, so you must not manully add it anywhere. The commit 11e29e0 does the same for the installed version, so if you have added -std=c++11 anywhere, then you should remove it. The c++ compiler doesn't mind if you add it twice, but nvcc does. it's very annoying. I think the commit is correct, but if you've got problems then please suggest a fix.

@atrantan
Copy link
Author

atrantan commented Feb 8, 2017

@biddisco I'm not sure but when you are in the hpx build treehpx_add_target_compile_option(${CXX_FLAG}) in file https://github.com/STEllAR-GROUP/hpx/blob/master/CMakeLists.txt line 945 is already putting the flag. Out of the hpx build tree (ex : when using an installed hpx), this flag disappears. Was the reason why ${CXX_FLAG} has been added in https://github.com/STEllAR-GROUP/hpx/blob/master/cmake/templates/HPXConfig.cmake.in and without disturbing the C++ compilation as it only touches nvcc flags

@atrantan
Copy link
Author

atrantan commented Feb 15, 2017

@biddisco Convinced? If yes fix has been done here 3b6adff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants