summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin <julien.voisin@dustri.org>2022-01-19 15:48:35 +0000
committerjvoisin <julien.voisin@dustri.org>2022-01-19 15:48:35 +0000
commit34dc7485dc25e1d5d3ee771015a7f6a8ff72c813 (patch)
treecea4d5210689dbc7195f4860885cb6bbb9b8ccf3
parent6eb36c6b7688595487aedac2262ee1575f7e287c (diff)
parenta79bdf07d27b659fd4ff0cb23eed0561e9597e62 (diff)
Merge branch 'static_or_bust' into 'master'
do some bash magic to rearrange CXX_FLAGS Closes #6560 See merge request OpenMW/openmw!1570
-rwxr-xr-xCI/before_script.linux.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh
index 2b1d156c77..2a10ae2b78 100755
--- a/CI/before_script.linux.sh
+++ b/CI/before_script.linux.sh
@@ -14,12 +14,7 @@ if [[ "${BUILD_TESTS_ONLY}" ]]; then
BUILD_BENCHMARKS=ON
fi
-CXX_FLAGS='-Werror -Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy'
-
-if [[ "${CXX}" == 'clang++' ]]; then
- CXX_FLAGS="${CXX_FLAGS} -Wno-error=unused-lambda-capture -Wno-error=gnu-zero-variadic-macro-arguments -Wno-error=misleading-indentation"
-fi
-
+# setup our basic cmake build options
declare -a CMAKE_CONF_OPTS=(
-DCMAKE_C_COMPILER="${CC:-/usr/bin/cc}"
-DCMAKE_CXX_COMPILER="${CXX:-/usr/bin/c++}"
@@ -29,10 +24,9 @@ declare -a CMAKE_CONF_OPTS=(
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DBUILD_SHARED_LIBS=OFF
-DUSE_SYSTEM_TINYXML=ON
+ -DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-DCMAKE_INSTALL_PREFIX=install
- -DCMAKE_C_FLAGS="-Werror -Wno-error=misleading-indentation"
- -DCMAKE_CXX_FLAGS="${CXX_FLAGS}"
- -DOPENMW_CXX_FLAGS="-Werror=implicit-fallthrough"
+ -DOPENMW_CXX_FLAGS="-Werror -Werror=implicit-fallthrough" # flags specific to OpenMW project
)
if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
@@ -41,12 +35,13 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
-DOPENMW_USE_SYSTEM_OSG=OFF
-DOPENMW_USE_SYSTEM_BULLET=OFF
-DOPENMW_USE_SYSTEM_SQLITE3=OFF
+ -DOPENMW_USE_SYSTEM_RECASTNAVIGATION=OFF
)
fi
if [[ $CI_CLANG_TIDY ]]; then
CMAKE_CONF_OPTS+=(
- -DCMAKE_CXX_CLANG_TIDY='clang-tidy;-checks=-*,boost-*,clang-analyzer-*,concurrency-*,performance-*,-header-filter=.*,bugprone-*,misc-definitions-in-headers,misc-misplaced-const,misc-redundant-expression,-bugprone-narrowing-conversions'
+ -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=-*,boost-*,clang-analyzer-*,concurrency-*,performance-*,-header-filter=.*,bugprone-*,misc-definitions-in-headers,misc-misplaced-const,misc-redundant-expression,-bugprone-narrowing-conversions"
)
fi
@@ -61,6 +56,16 @@ mkdir -p build
cd build
if [[ "${BUILD_TESTS_ONLY}" ]]; then
+
+ # flags specific to our test suite
+ CXX_FLAGS="-Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy"
+ if [[ "${CXX}" == 'clang++' ]]; then
+ CXX_FLAGS="${CXX_FLAGS} -Wno-error=unused-lambda-capture -Wno-error=gnu-zero-variadic-macro-arguments"
+ fi
+ CMAKE_CONF_OPTS+=(
+ -DCMAKE_CXX_FLAGS="${CXX_FLAGS}"
+ )
+
${ANALYZE} cmake \
"${CMAKE_CONF_OPTS[@]}" \
-DBUILD_OPENMW=OFF \