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

Replace pushd/popd Calls With -S/-B CMake Flags in the Build System #94353

Merged
merged 7 commits into from
Nov 29, 2023
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
8 changes: 3 additions & 5 deletions eng/native/gen-buildsys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,14 @@ if [[ "$host_arch" == "wasm" ]]; then
fi
fi

# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
pushd "$2"

$cmake_command \
--no-warn-unused-cli \
-G "$generator" \
"-DCMAKE_BUILD_TYPE=$buildtype" \
"-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
$cmake_extra_defines \
$__UnprocessedCMakeArgs \
"$1"
-S "$1" \
-B "$2"

popd
# don't add anything after this line so the cmake exit code gets propagated correctly
2 changes: 0 additions & 2 deletions src/native/libs/build-native.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ echo %MSBUILD_EMPTY_PROJECT_CONTENT% > "%__artifactsDir%\obj\native\Directory.Bu

:: Regenerate the VS solution

pushd "%__IntermediatesDir%"
call "%__repoRoot%\eng\native\gen-buildsys.cmd" "%__sourceRootDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__TargetOS% %__ExtraCmakeParams%
if NOT [%errorlevel%] == [0] goto :Failure
popd

:BuildNativeProj
:: Build the project created by Cmake
Expand Down
Loading