@@ -92,7 +92,7 @@ WORKDIR /home/${NONROOT_USER}
9292# Create a default Conan profile.
9393RUN conan profile detect
9494# Fix the C++ dialect.
95- RUN sed -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ${CONAN_HOME} /profiles/default
95+ RUN sed -i - e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ~/.conan2 /profiles/default
9696# Print the Conan profile to verify the configuration.
9797RUN conan profile show
9898
@@ -123,21 +123,21 @@ WORKDIR /home/${NONROOT_USER}
123123
124124# Create a default Conan profile.
125125RUN conan profile detect
126+ # Fix the C++ dialect.
127+ RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ~/.conan2/profiles/default
126128# To ensure compatibility with a range of Clang compilers, we must add extra
127129# flags that applies to certain versions of Clang.
128130RUN <<EOF
129- if [[ $(clang --version | head -1 | grep -Po 'version \K [0-9]{2}' ) -ge 20 ]]; then
130- cat >>${CONAN_HOME} /profiles/default <<EOT
131+ if [[ $(clang-${CLANG_VERSION} --version | head -1 | grep -Po 'version \K [0-9]{2}' ) -ge 20 ]]; then
132+ cat >>~/.conan2 /profiles/default <<EOT
131133tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw' , '-Wno-deprecated-declarations' ]
132134EOT
133- elif [[ $(clang --version | head -1 | grep -Po 'version \K [0-9]{2}' ) -eq 19 ]]; then
134- cat >>${CONAN_HOME} /profiles/default <<EOT
135+ elif [[ $(clang-${CLANG_VERSION} --version | head -1 | grep -Po 'version \K [0-9]{2}' ) -eq 19 ]]; then
136+ cat >>~/.conan2 /profiles/default <<EOT
135137[conf]
136138tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw' ]
137139EOT
138140fi
139141EOF
140- # Fix the C++ dialect.
141- RUN sed -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ${CONAN_HOME}/profiles/default
142142# Print the Conan profile to verify the configuration.
143143RUN conan profile show
0 commit comments