[tools] Fix the use of cached command-line variables in build_omim.sh #8710
3 changed files with 11 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -146,6 +146,7 @@ iphone/Maps/app.omaps/
|
|||
|
||||
![]() Right, I must have messed it up when I was trying to understand the macdeployqt issue, but shouldn't we ignore those anyway? Or is it used for important files? Right, I must have messed it up when I was trying to understand the macdeployqt issue, but shouldn't we ignore those anyway? Or is it used for important files?
![]() Please remove them, using cmake in the same dir as the source is an anti-pattern. Please remove them, using cmake in the same dir as the source is an anti-pattern.
|
||||
*.autosave
|
||||
|
||||
# CMake
|
||||
cmake-build-*
|
||||
build/
|
||||
|
||||
|
|
2
android/.gitignore
vendored
2
android/.gitignore
vendored
|
@ -22,3 +22,5 @@ local.properties
|
|||
lint.xml
|
||||
.gradletasknamecache
|
||||
|
||||
# Generated by Eclipse and JDTLS
|
||||
![]() Which app creates this folder? Which app creates this folder?
![]() This appeared back when I was working on my PR with an Android UI fix. Don't know exactly what caused it, but I assume it was some gradle build step? This appeared back when I was working on my PR with an Android UI fix. Don't know exactly what caused it, but I assume it was some gradle build step?
![]() What's inside? What's inside?
![]() Seems to be some preference files related to Eclipse (which I never used) and JDTLS (Eclipse's Java language server, which I use in my editor). We should probably keep it? Seems to be some preference files related to Eclipse (which I never used) and [JDTLS](https://github.com/eclipse-jdtls/eclipse.jdt.ls) (Eclipse's Java language server, which I use in my editor). We should probably keep it?
![]() Yes, please add a comment why it's needed. Yes, please add a comment why it's needed.
|
||||
.settings/
|
||||
|
|
|
@ -22,11 +22,11 @@ while getopts ":cdrxtagjlpn:" opt; do
|
|||
g) OPT_GCC=1 ;;
|
||||
j) OPT_COMPILE_DATABASE=1
|
||||
CMAKE_CONFIG="${CMAKE_CONFIG:-} -DCMAKE_EXPORT_COMPILE_COMMANDS=YES"
|
||||
;;
|
||||
;;
|
||||
l) OPT_LAUNCH_BINARY=1 ;;
|
||||
n) OPT_NJOBS="$OPTARG"
|
||||
CMAKE_CONFIG="${CMAKE_CONFIG:-} -DNJOBS=${OPT_NJOBS}"
|
||||
;;
|
||||
;;
|
||||
p) OPT_PATH="$OPTARG" ;;
|
||||
r) OPT_RELEASE=1 ;;
|
||||
t) OPT_DESIGNER=1 ;;
|
||||
|
@ -132,12 +132,11 @@ build()
|
|||
fi
|
||||
cd "$DIRNAME"
|
||||
if [ -z "$OPT_DESIGNER" ]; then
|
||||
if [ -n "$OPT_STANDALONE" ]; then
|
||||
"$CMAKE" "$CMAKE_GENERATOR" "$OMIM_PATH" -DCMAKE_BUILD_TYPE="$CONF" \
|
||||
-DBUILD_STANDALONE:bool=True ${CMAKE_CONFIG:-}
|
||||
else
|
||||
"$CMAKE" "$CMAKE_GENERATOR" "$OMIM_PATH" -DCMAKE_BUILD_TYPE="$CONF" ${CMAKE_CONFIG:-}
|
||||
fi
|
||||
"$CMAKE" "$CMAKE_GENERATOR" "$OMIM_PATH" \
|
||||
-DCMAKE_BUILD_TYPE="$CONF" \
|
||||
-DBUILD_DESIGNER:BOOL=OFF \
|
||||
-DBUILD_STANDALONE:BOOL=$([ "$OPT_STANDALONE" == 1 ] && echo "ON" || echo "OFF") \
|
||||
${CMAKE_CONFIG:-}
|
||||
echo ""
|
||||
$MAKE_COMMAND $OPT_TARGET
|
||||
if [ -n "$OPT_TARGET" ] && [ -n "$OPT_LAUNCH_BINARY" ]; then
|
||||
|
@ -146,8 +145,7 @@ build()
|
|||
done
|
||||
fi
|
||||
else
|
||||
"$CMAKE" "$CMAKE_GENERATOR" "$OMIM_PATH" -DCMAKE_BUILD_TYPE="$CONF" \
|
||||
-DBUILD_DESIGNER:bool=True ${CMAKE_CONFIG:-}
|
||||
"$CMAKE" "$CMAKE_GENERATOR" "$OMIM_PATH" -DCMAKE_BUILD_TYPE="$CONF" -DBUILD_DESIGNER:BOOL=ON ${CMAKE_CONFIG:-}
|
||||
$MAKE_COMMAND package
|
||||
fi
|
||||
if [ -n "$OPT_COMPILE_DATABASE" ]; then
|
||||
|
|
Reference in a new issue
Looks like the cmake is not used properly. All temporary files should be created in a different directory, not in the source directory. E.g.:
All these lines should not be needed if cmake is used properly from a different directory.