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

Use designated build directory for glog #739

Merged
merged 2 commits into from
Oct 16, 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
6 changes: 3 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if %build_deps% == 0 (

if %clean% == 1 (
rmdir /s /q build
rmdir /s /q deps\glog\cmake-build
rmdir /s /q deps\glog\build
rmdir /s /q deps\googletest\build
rmdir /s /q deps\leveldb\build
rmdir /s /q deps\marisa-trie\build
Expand Down Expand Up @@ -112,13 +112,13 @@ set deps_cmake_flags=%common_cmake_flags%^
if %build_deps% == 1 (
echo building glog.
pushd deps\glog
cmake . -Bcmake-%build_dir% %deps_cmake_flags%^
cmake . -B%build_dir% %deps_cmake_flags%^
-DBUILD_SHARED_LIBS:BOOL=OFF^
-DBUILD_TESTING:BOOL=OFF^
-DWITH_GFLAGS:BOOL=OFF^
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>"
if errorlevel 1 goto error
cmake --build cmake-%build_dir% --config %build_config% --target install
cmake --build %build_dir% --config %build_config% --target install
if errorlevel 1 goto error
popd

Expand Down
3 changes: 1 addition & 2 deletions deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ifndef NOPARALLEL
export MAKEFLAGS+=" -j$(( $(nproc) + 1)) "
endif

glog: build ?= cmake-build
build ?= build

rime_deps = glog gtest leveldb marisa opencc yaml-cpp
Expand All @@ -18,7 +17,7 @@ all: $(rime_deps)

# note: this won't clean output files under include/, lib/ and bin/.
clean-src:
rm -r $(src_dir)/glog/cmake-build || true
rm -r $(src_dir)/glog/build || true
rm -r $(src_dir)/googletest/build || true
rm -r $(src_dir)/leveldb/build || true
rm -r $(src_dir)/marisa-trie/build || true
Expand Down