Add no-asm target to ease testing of -DCRYPTOPP_DISABLE_ASM

This is intended to be used on Travis CI
This commit is contained in:
Jeffrey Walton 2017-04-17 00:20:22 -04:00
parent 7df4418258
commit b784852998
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -360,6 +360,13 @@ ARFLAGS = -xar -o
RANLIB = true
endif
# No ASM for Travis testing
ifeq ($(findstring no-asm,$(MAKECMDGOALS)),no-asm)
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif # CXXFLAGS
endif # No ASM
# Undefined Behavior Sanitizer (UBsan) testing. There's no sense in
# allowing unaligned data access. There will too many findings.
ifeq ($(findstring ubsan,$(MAKECMDGOALS)),ubsan)
@ -515,8 +522,8 @@ deps GNUmakefile.deps:
$(CXX) $(strip $(CXXFLAGS)) -MM *.cpp > GNUmakefile.deps
# CXXFLAGS are tuned earlier.
.PHONY: asan ubsan
asan ubsan: libcryptopp.a cryptest.exe
.PHONY: asan ubsan no-asm
no-asm asan ubsan: libcryptopp.a cryptest.exe
# CXXFLAGS are tuned earlier. Applications must use linker flags
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)