kokkos / nvcc_wrapper

Wrapper shell script for NVIDIA nvcc to better conform to host compiler command line arguments
7 stars 13 forks source link

nvcc_wrapper: Handle -+ for XL #24

Closed theguruat12 closed 6 years ago

theguruat12 commented 6 years ago

XL compilers have an option called '-+' that equates to '-x c++' (directly from the manpage). However, passing '-+' with any '-x' option causes an error. So, translate '-+' to '-x c++'. This is of particular relevance because CMake adds '-+' to CXX compiler lines using XL.

This should fix https://github.com/kokkos/kokkos/issues/897 as well (though it is already technically closed).

theguruat12 commented 6 years ago

This directly addresses https://github.com/kokkos/nvcc_wrapper/issues/23

crtrott commented 6 years ago

Can you rebase this on top of the develop branch and reissue the pull request? Thanks. We will merge this into master in conjunction with the next Kokkos promotion sometime in the next couple weeks.

theguruat12 commented 6 years ago

See https://github.com/kokkos/nvcc_wrapper/pull/25

trudeaun commented 6 years ago

@theguruat12 Hi Sam. I saw that you plan to translate -+ to -x c++, and just wanted to let you know that while these options are similar, they will not be equivalent in all cases. -+ will compile all files as C++ language files, whereas -x c++ will only compile all files following the option as C++ language files.

theguruat12 commented 6 years ago

@trudeaun Thank you for that information. It is not specified in the manpage listing for '-+' but I do now see that it IS included in the entry for '-x'. It should not make a significant difference for this use case, but will be good to know in case something changes.