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 =
# armadillo structures may have different byte-alignment
# to equivalent g++-compiled structures (see
# include/armadillo_bits/compiler_setup.hpp)
ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC
ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC -std=c++14
# Linker flags for CUDA projects.
ARCHNVCCLDFLAGS =
......
......@@ -119,11 +119,16 @@ CXXFLAGS += ${CPPFLAGS} ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS}
LDFLAGS += ${ARCHLDFLAGS} ${USRLDFLAGS} \
-L. -L${DEVLIBDIR} -L${LIBDIR} \
${LIBS} ${ARCHLIBS}
NVCCFLAGS += --compiler-options "${CPPFLAGS}" \
${ARCHNVCCFLAGS} \
--compiler-options "${ARCHCXXFLAGS}" \
${USRNVCCFLAGS} \
--compiler-options "${USRCXXFLAGS}" \
# Remove any -std=c++ options, as we are already setting
# -std in ARCHNVCCFLAGS (seee buildSettings.mk), and
# passing another one via --compiler-options will confuse
# nvcc. We assume that project Makefile has not added
# -std to USRCXXFLAGGS/USRCPPFLAGS.
NVCCFLAGS += --compiler-options "${CPPFLAGS}" \
${ARCHNVCCFLAGS} \
--compiler-options "$(patsubst -std=c++%,,${ARCHCXXFLAGS})" \
${USRNVCCFLAGS} \
--compiler-options "${USRCXXFLAGS}" \
${INCFLAGS}
NVCCLDFLAGS += ${ARCHNVCCLDFLAGS} \
--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