@@ -116,10 +116,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
116116fi
117117EOF
118118
119+ # Set the Conan home directory, so the users of this image can find the default
120+ # profile.
119121ENV HOME=/root
120122WORKDIR ${HOME}
121-
122- # Set Conan home directory, so the users of this image can find default profile
123123ENV CONAN_HOME=${HOME}/.conan2
124124
125125# Create a default Conan profile.
@@ -128,14 +128,14 @@ conan profile detect
128128rm -rf /tmp/*
129129EOF
130130
131- # Fix the C++ dialect.
132- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
133- # Explicitly set the compiler flags.
131+ # Explicitly set the compiler flags and the distribution name and version.
134132RUN <<EOF
135133cat >> $(conan config home)/global.conf <<EOT
134+ tools.info.package_id:confs+=["RHEL" , "${RHEL_VERSION}" ]
136135tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
137136EOT
138137EOF
138+
139139# Print the Conan profile to verify the configuration.
140140RUN conan profile show
141141
@@ -197,10 +197,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
197197fi
198198EOF
199199
200+ # Set the Conan home directory, so the users of this image can find the default
201+ # profile.
200202ENV HOME=/root
201203WORKDIR ${HOME}
202-
203- # Set Conan home directory, so the users of this image can find default profile
204204ENV CONAN_HOME=${HOME}/.conan2
205205
206206# Create a default Conan profile.
@@ -209,16 +209,10 @@ conan profile detect
209209rm -rf /tmp/*
210210EOF
211211
212- # Fix the C++ dialect.
213- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
214- # Explicitly set the compiler flags. To ensure compatibility with a range of
215- # Clang compilers, we must also add extra flags that apply to certain versions
216- # of Clang.
217- # TODO: Move extra flags into the rippled repository as a custom Conan profile.
212+ # Explicitly set the compiler flags and the distribution name and version.
218213RUN <<EOF
219- CXX_VER=$(${CXX} -dumpversion)
220- CXX_VER=${CXX_VER%%.*}
221214cat >> $(conan config home)/global.conf <<EOT
215+ tools.info.package_id:confs+=["RHEL" , "${RHEL_VERSION}" ]
222216tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
223217EOT
224218EOF
0 commit comments