forked from boostorg/preprocessor
Adjusted the configuration so that compiling a cuda source file ( .cu ) using clang does not set BOOST_PP_VARIADICS to 0. An 'explicit' test was also added for this situation.
This commit is contained in:
@ -247,3 +247,13 @@ alias preprocessor_config
|
||||
:
|
||||
[ run config_info.cpp ]
|
||||
;
|
||||
|
||||
alias clang_cuda
|
||||
:
|
||||
[ compile clang_cuda.cu
|
||||
: <cxxflags>--cuda-gpu-arch=sm_20
|
||||
: clang_cuda_cu
|
||||
]
|
||||
;
|
||||
|
||||
explicit clang_cuda ;
|
||||
|
29
test/clang_cuda.cu
Normal file
29
test/clang_cuda.cu
Normal file
@ -0,0 +1,29 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2019.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
#
|
||||
# define BEGIN typedef int BOOST_PP_CAT(test_, __LINE__)[((
|
||||
# define END )==1) ? 1 : -1];
|
||||
|
||||
#if defined(__clang__) && defined(__CUDACC__) && defined(__CUDA__)
|
||||
|
||||
BEGIN BOOST_PP_VARIADICS == 1 END
|
||||
|
||||
#else
|
||||
|
||||
BEGIN 0 == 1 END
|
||||
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user