Merge ENGINE-259
authorDamiano Boppart <damiano@pep-security.net>
Tue, 19 Sep 2017 15:02:12 +0200
changeset 20762aadece6fcf4
parent 2070 d834a86b51e9
parent 2075 92b8a67735e0
child 2079 1e94912983c5
child 2080 530051a7d3ea
child 2088 6e0756ac5b2a
Merge ENGINE-259
     1.1 --- a/build-config/common.conf	Tue Sep 19 14:39:41 2017 +0200
     1.2 +++ b/build-config/common.conf	Tue Sep 19 15:02:12 2017 +0200
     1.3 @@ -27,12 +27,16 @@
     1.4  ######### C #########
     1.5  #CC This option is platform-specific
     1.6  CPPFLAGS=
     1.7 +# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
     1.8 +# The tests do not work properly, if compiled with -DNDEBUG
     1.9  #CFLAGS This option is platform-specific
    1.10  # Additional CFLAGS used for compiling ASN1C-generated code
    1.11  #CFLAGS_GENERATED This option is platform-specific
    1.12  
    1.13  ######### C++ #########
    1.14  #CXX This option is platform-specific
    1.15 +# The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
    1.16 +# The tests do not work properly, if compiled with -DNDEBUG
    1.17  #CXXFLAGS This option is platform-specific
    1.18  
    1.19  ######### C and C++ #########
     2.1 --- a/test/Makefile	Tue Sep 19 14:39:41 2017 +0200
     2.2 +++ b/test/Makefile	Tue Sep 19 15:02:12 2017 +0200
     2.3 @@ -57,12 +57,20 @@
     2.4  UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
     2.5  UNIT_TESTS_RUN=$(subst .cc,_run,$(UNIT_TESTS_SOURCE))
     2.6  
     2.7 +CFLAGS:=$(filter-out -DNDEBUG,$(CFLAGS))
     2.8  ifneq ($(MAKECMDGOALS),clean)
     2.9      ifneq (,$(findstring -DNDEBUG,$(CFLAGS)))
    2.10          $(error The macro NDEBUG must not be defined for test compilation.)
    2.11      endif
    2.12  endif
    2.13  
    2.14 +CXXFLAGS:=$(filter-out -DNDEBUG,$(CXXFLAGS))
    2.15 +ifneq ($(MAKECMDGOALS),clean)
    2.16 +    ifneq (,$(findstring -DNDEBUG,$(CXXFLAGS)))
    2.17 +        $(error The macro NDEBUG must not be defined for test compilation.)
    2.18 +    endif
    2.19 +endif
    2.20 +
    2.21  .PHONY: all
    2.22  all: $(TARGET) $(UNIT_TESTS)
    2.23