blt icon indicating copy to clipboard operation
blt copied to clipboard

Remove hard-coded C++11 in CUDA flags

Open white238 opened this issue 5 years ago • 5 comments

https://github.com/LLNL/blt/blob/develop/cmake/thirdparty/SetupCUDA.cmake#L85

white238 avatar Sep 24 '20 18:09 white238

Since CAMP, RAJA, CHAI, Umpire are requiring C++14 in their next release (which should be very soon), this would be great to get in soon.

adayton1 avatar Mar 15 '22 16:03 adayton1

If it's a simple matter of replacing that hardcoded flag with a cmake variable, I could put in a merge request. Is there a BLT_CUDA_STD variable?

adayton1 avatar Mar 15 '22 16:03 adayton1

Related logic here:

https://github.com/LLNL/blt/blob/e35f490a8a8b1689e99b5f4308b5251f97eb36cf/cmake/SetupCompilerOptions.cmake#L168-L179

And defining std flags here:

https://github.com/LLNL/blt/blob/e35f490a8a8b1689e99b5f4308b5251f97eb36cf/cmake/SetupCompilerOptions.cmake#L259-L322

white238 avatar Mar 15 '22 16:03 white238

Ah, so you set CMAKE_CUDA_STANDARD based off of BLT_CXX_STD. Would it work to use "-std=${BLT_CXX_STD}"? Or is there a complication I'm missing?

adayton1 avatar Mar 15 '22 16:03 adayton1

I think that should work. Not all compilers use the standardized flag but NVCC uses the normal flags like BLT accepts. Is there a case where you wouldn't want them to be the same? Like C++17 for everything but the CUDA specific code... I'm probably over thinking this and we can solve this later if it comes up.

white238 avatar Mar 15 '22 18:03 white238

Fixed in #570

white238 avatar Jun 06 '23 05:06 white238