Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to accommodate macos clang boost error from -Wenum-constexpr-… #326

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions generate4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
<install>
<!-- Boost.system is necessary for detection, which is only required for test. -->
<build name="boost" version="1.78.0" parallel="true" nuget="true" prebuild="true" >
<flag value="-Wno-enum-constexpr-conversion" />
<option value="--with-system" />
<option value="--with-test" />
</build>
Expand Down Expand Up @@ -482,6 +483,7 @@
<option value="--disable-samples" />
</build>
<build name="boost" version="1.78.0" parallel="true" nuget="true" prebuild="true" >
<flag value="-Wno-enum-constexpr-conversion" />
<option value="--with-chrono" />
<option value="--with-iostreams" />
<option value="--with-json" />
Expand Down Expand Up @@ -707,6 +709,7 @@
<option value="--disable-samples" />
</build>
<build name="boost" version="1.78.0" parallel="true" nuget="true" prebuild="true" >
<flag value="-Wno-enum-constexpr-conversion" />
<option value="--with-chrono" />
<option value="--with-iostreams" />
<option value="--with-json" />
Expand Down
11 changes: 1 addition & 10 deletions templates/gsl.CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ function boost_component(name)
endif
endfunction

function join_flags(container)
define my.container = join_flags.container
define my.result = ""
for my.container.flag as _flag where defined(_flag.name) & !is_empty(_flag.name)
my.result = join(my.result, "-$(_flag.name)", " ")
endfor
return my.result
endfunction

function get_cmake_system_from_name(name, sentinel)
define my.result = my.sentinel

Expand Down Expand Up @@ -1107,7 +1098,7 @@ $(my.indent)$(my.name)( $(my.target_name)
. endif
.
. define my.indent = defined(my.option) ?? " " ? ""
. define my.flags = join_flags(my.compound)
. define my.flags = join_flags_name(my.compound)
. define my.symbol_prefix = defined(my.option) ?? "HAS_FLAGS_" ? my.define_prefix
.
. if defined(my.option)
Expand Down
11 changes: 1 addition & 10 deletions templates/gsl.configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
# Functions
###############################################################################

function join_flags(container)
define my.container = join_flags.container
define my.result = ""
for my.container.flag as _flag where defined(_flag.name) & !is_empty(_flag.name)
my.result = join(my.result, "-$(_flag.name)", " ")
endfor
return my.result
endfunction

function substitute_system_include(variable_name)
return "`echo ${$(my.variable_name)} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`"
endfunction
Expand Down Expand Up @@ -1022,7 +1013,7 @@ AC_MSG_NOTICE([$(my.cname)_BUILD_CPPFLAGS : ${$(my.cname)_BUILD_CPPFLAGS}])
. endif
.
. define my.indent = defined(my.option) ?? " " ? ""
. define my.flags = join_flags(my.compound)
. define my.flags = join_flags_name(my.compound)
. define my.terminator = "])"
.
. if defined(my.option)
Expand Down
27 changes: 18 additions & 9 deletions templates/shared/common_install_shell_artifacts.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -1105,14 +1105,29 @@ build_from_tarball_boost()

initialize_boost_configuration
initialize_boost_icu_configuration
.
. if (defined(my.build.prebuild))

guessed_toolset=`./tools/build/src/engine/build.sh --guess-toolset`
CXXFLAGS="-w" ./tools/build/src/engine/build.sh ${guessed_toolset} --cxxflags="-w"
cp tools/build/src/engine/b2 .
. endif
.
. if (count(my.build.flag) > 0)
if [[ (x"$BOOST_CXXFLAGS" == "x") ]]; then
BOOST_CXXFLAGS="cxxflags=${BOOST_FLAGS[@]}"
else
BOOST_CXXFLAGS="$BOOST_CXXFLAGS ${BOOST_FLAGS[@]}"
fi
. endif

display_message "Libbitcoin boost configuration."
display_message "--------------------------------------------------------------------"
display_message "variant : release"
display_message "threading : multi"
display_message "toolset : $CC"
display_message "cxxflags : $STDLIB_FLAG"
display_message "linkflags : $STDLIB_FLAG"
display_message "boost cxxflags : $BOOST_CXXFLAGS"
display_message "boost linkflags : $BOOST_LINKFLAGS"
display_message "link : $BOOST_LINK"
display_message "boost.locale.iconv : $BOOST_ICU_ICONV"
display_message "boost.locale.posix : $BOOST_ICU_POSIX"
Expand All @@ -1126,15 +1141,9 @@ build_from_tarball_boost()
display_message "--reconfigure : [ignore cached configuration]"
display_message "--prefix : $PREFIX"
display_message "BOOST_OPTIONS : $*"
display_message "cxxflags (ignored) : $CXXFLAGS"
display_message "--------------------------------------------------------------------"

.
. if (defined(my.build.prebuild))
guessed_toolset=`./tools/build/src/engine/build.sh --guess-toolset`
CXXFLAGS="-w" ./tools/build/src/engine/build.sh ${guessed_toolset} --cxxflags="-w"
cp tools/build/src/engine/b2 .

. endif
./bootstrap.sh \\
. if (defined(my.build.prebuild))
"--with-bjam=./b2" \\
Expand Down
18 changes: 18 additions & 0 deletions utilities.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@ endfunction
# Library utilities.
#------------------------------------------------------------------------------

function global.join_flags_name(container)
define my.container = join_flags_name.container
define my.result = ""
for my.container.flag as _flag where defined(_flag.name) & !is_empty(_flag.name)
my.result = join(my.result, "-$(_flag.name)", " ")
endfor
return my.result
endfunction

function global.join_flags_value(container)
define my.container = join_flags_value.container
define my.result = ""
for my.container.flag as _flag where defined(_flag.value) & !is_empty(_flag.value)
my.result = join(my.result, "$(_flag.value)", " ")
endfor
return my.result
endfunction

function global.canonical_path_name(repository)
define my.repository = canonical_path_name.repository
return defined(my.repository.path) ?? my.repository.path ?\
Expand Down
Loading