I’m trying to integrate ComputeCpp into alpaka’s CMake-based build system. For our test cases we enable a lot of warnings and compile with -Werror
. ComputeCpp’s internal headers cause a lot of warnings that result in a failing build when the following flags are enabled:
-Wreserved-id-macro
-Wdocumentation-unknown-command
-Wundef
-Wextra-semi
-Wshadow-field-in-constructor
-Wdouble-promotion
-Wnewline-eof
-Wdocumentation
-Wunused-parameter
-Wsign-conversion
-Wdeprecated
-Wshadow
-Wexit-time-destructors
-Wold-style-cast
Apart from disabling these warnings they can be silenced by including ComputeCpp’s headers as SYSTEM
headers but I’m not sure if this may cause unwanted side effects. For reference, this is the compiler command line CMake uses (stripped include directories and other alpaka-related flags):
compute++ -DSYCL_LANGUAGE_VERSION=2020 \
-I/home/stepha27/sycl-workspace/computecpp/include \
-I/home/stepha27/software/computecpp-sdk/include \
-O3\
-DNDEBUG\
-Werror\
-Weverything\
-Wno-c++98-compat\
-Wno-c++98-compat-pedantic\
-Wno-disabled-macro-expansion\
-Wno-global-constructors\
-Wno-padded\
-sycl-driver\
-fno-sycl-address-space\
-Wsycl-known-virtual\
-sycl-target spir64\
-std=gnu++17\
-o axpy.cpp.o -c axpy.cpp