d/rules: build tests even if x86-64-v2 is not supported
If nocheck is not set, tests are always built but only run after checking if the build CPU has all the x86-64-v2 features in the override_dh_auto_test step.
This commit is contained in:
parent
87352328e4
commit
d082c229e9
1 changed files with 9 additions and 8 deletions
17
debian/rules
vendored
17
debian/rules
vendored
|
@ -32,19 +32,12 @@ ifeq ($(DEB_HOST_ARCH_CPU),amd64)
|
||||||
export DEB_CXXFLAGS_MAINT_APPEND = -march=x86-64-v2
|
export DEB_CXXFLAGS_MAINT_APPEND = -march=x86-64-v2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test := true
|
|
||||||
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
||||||
ifeq ($(DEB_HOST_ARCH_CPU),amd64)
|
test := true
|
||||||
ifeq (,$(shell lscpu | awk '/cx16/ && /lahf/ && /popcnt/ && /sse3/ && /sse4_1/ && /sse4_2/ && /ssse3/'))
|
|
||||||
$(warning Your CPU doesn't support the x86-64-v2 micro-architecture level. Tests will be skipped.)
|
|
||||||
test := false
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
test := false
|
test := false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
build_type := Release
|
build_type := Release
|
||||||
lto := true
|
lto := true
|
||||||
|
@ -80,5 +73,13 @@ override_dh_auto_configure:
|
||||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$(lto) \
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$(lto) \
|
||||||
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW
|
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
supports_x86_64_v2=$$(lscpu | awk '/cx16/ && /lahf/ && /popcnt/ && /sse3/ && /sse4_1/ && /sse4_2/ && /ssse3/' | tr -d '[:space:]') ; \
|
||||||
|
if [ '$(DEB_HOST_BUILD_CPU)' = amd64 ] && [ -z "$$supports_x86_64_v2" ]; then \
|
||||||
|
echo "Your CPU doesn't support the x86-64-v2 micro-architecture level. Tests will be skipped." ; \
|
||||||
|
else \
|
||||||
|
dh_auto_test ; \
|
||||||
|
fi
|
||||||
|
|
||||||
execute_after_dh_auto_clean:
|
execute_after_dh_auto_clean:
|
||||||
$(RM) externals/sirit
|
$(RM) externals/sirit
|
||||||
|
|
Loading…
Reference in a new issue