Fix Clang Cuda flags
[alexxy/gromacs.git] / cmake / gmxManageGPU.cmake
index 203c8939a39974298a24494e9d1b44e847d58dcb..66f206130833b9c89982b2b946557a6e8df4c419 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -186,7 +186,8 @@ macro(get_cuda_compiler_info COMPILER_INFO DEVICE_COMPILER_FLAGS HOST_COMPILER_F
         # CXX compiler is the CUDA compiler
         set(${COMPILER_INFO} "${CMAKE_CXX_COMPILER}  ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
         # there are some extra flags
-        set(${COMPILER_FLAGS} "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_build_type}} ${GMX_CUDA_CLANG_FLAGS}")
+        set(${HOST_COMPILER_FLAGS} BUILD_CXXFLAGS)
+        set(${DEVICE_COMPILER_FLAGS} "${GMX_CUDA_CLANG_FLAGS}")
     endif()
 endmacro ()