Skip to content

Commit

Permalink
SL-18837: Don't let CMake infer CMAKE_C_FLAGS from CMAKE_CXX_FLAGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-goodspeed committed Apr 19, 2023
1 parent b70841d commit 02a8fc5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"

# remove_cxxstd
source "$(dirname "$AUTOBUILD_VARIABLES_FILE")/functions"

# Use msbuild.exe instead of devenv.com
build_sln() {
local solution=$1
Expand Down Expand Up @@ -142,9 +145,12 @@ case "$AUTOBUILD_PLATFORM" in
rm -rf "$cef_no_wrapper_build_dir"
mkdir -p "$cef_no_wrapper_build_dir"
cd "$cef_no_wrapper_build_dir"
opts="$LL_BUILD_RELEASE"
plainopts="$(remove_cxxstd $opts)"
cmake -G Xcode \
-DPROJECT_ARCH="x86_64" \
-DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \
-DCMAKE_C_FLAGS="$plainopts" \
-DCMAKE_CXX_FLAGS="$opts" \
..
xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Debug
xcodebuild -project cef.xcodeproj -target libcef_dll_wrapper -configuration Release
Expand All @@ -155,7 +161,8 @@ case "$AUTOBUILD_PLATFORM" in
-DCMAKE_OSX_ARCHITECTURES="$AUTOBUILD_CONFIGURE_ARCH" \
-DCEF_WRAPPER_DIR="$cef_no_wrapper_dir" \
-DCEF_WRAPPER_BUILD_DIR="$cef_no_wrapper_build_dir" \
-DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE" \
-DCMAKE_C_FLAGS:STRING="$plainopts" \
-DCMAKE_CXX_FLAGS:STRING="$opts" \
..

xcodebuild -project dullahan.xcodeproj -target dullahan -configuration Release
Expand Down Expand Up @@ -226,16 +233,19 @@ case "$AUTOBUILD_PLATFORM" in
rm -rf "${cef_no_wrapper_build_dir}"
mkdir -p "${cef_no_wrapper_build_dir}"
cd "${cef_no_wrapper_build_dir}"
opts="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}"
plainopts="$(remove_cxxstd $opts)"
cmake -G Ninja \
-DCMAKE_CXX_FLAGS="$LL_BUILD_RELEASE" \
-DCMAKE_C_FLAGS="$plainopts" \
-DCMAKE_CXX_FLAGS="$opts" \
..
ninja libcef_dll_wrapper

cd "$stage"
cmake .. -G Ninja \
-DCEF_WRAPPER_DIR="${cef_no_wrapper_dir}" \
-DCEF_WRAPPER_BUILD_DIR="${cef_no_wrapper_build_dir}" \
-DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE -m${AUTOBUILD_ADDRSIZE}"
-DCMAKE_CXX_FLAGS:STRING="$opts"

ninja

Expand Down

0 comments on commit 02a8fc5

Please sign in to comment.