You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DKOKKOS_ENABLE_OPENMP=ON
make -j VERBOSE=1
will show the CXX_FLAGS as: -O3 -DNDEBUG --std=c++11 -fopenmp -std=c++14. Even though I believe the later "-std=c++14" will overwrite the earlier one, it would be nice to only set the user-defined standard option instead of whatever Kokkos assumes unless I'm missing something here.
The text was updated successfully, but these errors were encountered:
I'm not sure yet whether or how we want to support usage of Kokkos from codes that use C++14 or C++17. Maybe we add some kind of KOKKOS_CXX_STANDARD, which derives from CMAKE_CXX_STANDARD if the latter is set...
actually that does exist already. We just need to fix the CMake / Make interaction that the standard is correctly set. The reason for us to set the standard on the Make side instead of CMake is btw CUDA and the interaction with some CUDA flags.
There are flags for CUDA such as --expt-extended-lambda which require C++11 or higher to be set. The way cmake tested compiler flags though made it test those user provided flags without adding the C++ standard flag which then would fail configure. So we said in Trilinos land, that we need to add the standard thing explicitly to the CXX flags together with all the other ones. But this is clearly an issue here.
crtrott
added
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
and removed
Question
For Kokkos internal and external contributors and users
labels
Apr 10, 2018
Hi,
Say I have a cmake project that require using c++14 with the following CMakeLists.txt (following the cmake_build example):
and running
will show the CXX_FLAGS as:
-O3 -DNDEBUG --std=c++11 -fopenmp -std=c++14
. Even though I believe the later "-std=c++14" will overwrite the earlier one, it would be nice to only set the user-defined standard option instead of whatever Kokkos assumes unless I'm missing something here.The text was updated successfully, but these errors were encountered: