@@ -98,11 +98,10 @@ rm -rf /tmp/*
9898EOF
9999
100100# Fix the C++ dialect.
101- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ${CONAN_HOME} /profiles/default
101+ RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home) /profiles/default
102102# Explicitly set the compiler flags.
103103RUN <<EOF
104- cat >>${CONAN_HOME}/profiles/default <<EOT
105- [conf]
104+ cat >> $(conan config home)/global.conf <<EOT
106105tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
107106EOT
108107EOF
@@ -117,7 +116,7 @@ std::string f() { return "_" + std::string(" "); }
117116EOT
118117${CXX} -std=c++20 -Wall -Werror -O3 -c main.cpp || touch fail
119118if [[ -f fail ]]; then
120- cat >>~/.conan2/profiles/default <<EOT
119+ cat >> $(conan config home)/global.conf <<EOT
121120tools.build:cxxflags=['-Wno-restrict' ]
122121EOT
123122fi
@@ -181,20 +180,19 @@ rm -rf /tmp/*
181180EOF
182181
183182# Fix the C++ dialect.
184- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' ${CONAN_HOME} /profiles/default
183+ RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home) /profiles/default
185184# Explicitly set the compiler flags. To ensure compatibility with a range of
186185# Clang compilers, we must also add extra flags that apply to certain versions
187186# of Clang.
188187# TODO: Move extra flags into the rippled repository as a custom Conan profile.
189188RUN <<EOF
190189CXX_VER=$(${CXX} -dumpversion)
191190CXX_VER=${CXX_VER%%.*}
192- cat >>${CONAN_HOME}/profiles/default <<EOT
193- [conf]
191+ cat >> $(conan config home)/global.conf <<EOT
194192tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
195193EOT
196194if [[ ${CXX_VER} -ge 19 ]]; then
197- cat >>${CONAN_HOME}/profiles/default <<EOT
195+ cat >> $(conan config home)/global.conf <<EOT
198196tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw' ]
199197EOT
200198fi
0 commit comments