Skip to content
Snippets Groups Projects
Commit e67dfd71 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Set -std=c++14 for nvcc-compiled code - CUDA 11.0 is the earliest to

support c++17
parent 91eacbc7
No related branches found
No related tags found
1 merge request!33RF: Set -std=c++14 for nvcc-compiled code - CUDA 11.0 is the earliest to support c++17
...@@ -65,7 +65,7 @@ ARCHLIBS = ...@@ -65,7 +65,7 @@ ARCHLIBS =
# armadillo structures may have different byte-alignment # armadillo structures may have different byte-alignment
# to equivalent g++-compiled structures (see # to equivalent g++-compiled structures (see
# include/armadillo_bits/compiler_setup.hpp) # include/armadillo_bits/compiler_setup.hpp)
ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC -std=c++14
# Linker flags for CUDA projects. # Linker flags for CUDA projects.
ARCHNVCCLDFLAGS = ARCHNVCCLDFLAGS =
......
...@@ -119,11 +119,16 @@ CXXFLAGS += ${CPPFLAGS} ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS} ...@@ -119,11 +119,16 @@ CXXFLAGS += ${CPPFLAGS} ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS}
LDFLAGS += ${ARCHLDFLAGS} ${USRLDFLAGS} \ LDFLAGS += ${ARCHLDFLAGS} ${USRLDFLAGS} \
-L. -L${DEVLIBDIR} -L${LIBDIR} \ -L. -L${DEVLIBDIR} -L${LIBDIR} \
${LIBS} ${ARCHLIBS} ${LIBS} ${ARCHLIBS}
NVCCFLAGS += --compiler-options "${CPPFLAGS}" \ # Remove any -std=c++ options, as we are already setting
${ARCHNVCCFLAGS} \ # -std in ARCHNVCCFLAGS (seee buildSettings.mk), and
--compiler-options "${ARCHCXXFLAGS}" \ # passing another one via --compiler-options will confuse
${USRNVCCFLAGS} \ # nvcc. We assume that project Makefile has not added
--compiler-options "${USRCXXFLAGS}" \ # -std to USRCXXFLAGGS/USRCPPFLAGS.
NVCCFLAGS += --compiler-options "${CPPFLAGS}" \
${ARCHNVCCFLAGS} \
--compiler-options "$(patsubst -std=c++%,,${ARCHCXXFLAGS})" \
${USRNVCCFLAGS} \
--compiler-options "${USRCXXFLAGS}" \
${INCFLAGS} ${INCFLAGS}
NVCCLDFLAGS += ${ARCHNVCCLDFLAGS} \ NVCCLDFLAGS += ${ARCHNVCCLDFLAGS} \
--compiler-options "${ARCHLDFLAGS}" \ --compiler-options "${ARCHLDFLAGS}" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment