diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdf8f75f6cfc4f99845f77cff699e8b22a3a7534..9cad515c2bef7e44769ce0d452a96ed5bad7e3f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,16 @@ stages: + - prepare - linting - build - test - extra +setenv: + stage: prepare + script: + - export CCACHE_NOHASHDIR=1 + - export CCACHE_BASEDIR=${CI_PROJECT_DIR} + cpplint: stage: linting script: diff --git a/CMakeLists.txt b/CMakeLists.txt index b4a6dbbaf952f823b1980380214bf5c356f81b35..1e0963e6fb92bf7118f7cbdb16de7a00efb738eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,9 @@ if(MACE_ENABLE_OPT_SIZE) endif(MACE_ENABLE_OPT_SIZE) # flags apply only to mace code (third_party excluded) -set(MACE_CODE_CC_FLAGS "${MACE_CODE_CC_FLAGS} -Wall -Werror") +# -Wno-error=unused-command-line-argument: official Android toolchain contains +# unsupported argument and will break ccache preprocessor +set(MACE_CODE_CC_FLAGS "${MACE_CODE_CC_FLAGS} -Wall -Werror -Wno-error=unused-command-line-argument") set(MACE_CODE_CC_FLAGS "${MACE_CODE_CC_FLAGS} -std=c++11 -D_GLIBCXX_USE_C99_MATH_TR1") if(IOS) diff --git a/mace/core/quantize.h b/mace/core/quantize.h index 00fb3db9121d6add2d16507f1bf7b1b3a92fadf3..c7b6666dda378e99ad7a99714a6c7dca74b41619 100644 --- a/mace/core/quantize.h +++ b/mace/core/quantize.h @@ -100,7 +100,6 @@ inline void QuantizeMultiplier(double multiplier, ++*shift; } *output_multiplier = static_cast(qint); - MACE_CHECK(*output_multiplier <= std::numeric_limits::max()); } inline void GetOutputMultiplierAndShift(