Skip to content

Conversation

@martin-barta-sie
Copy link
Contributor

No description provided.

Copy link
Member

@DDvO DDvO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly fine to me.
Good that you cleaned up some #includes etc.

Comment on lines -46 to -47
if(DEFINED ENV{NDEBUG})
add_definitions(-DNDEBUG=1 -O2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that regarding (N)DEBUG, CMakeLists.txt and Makefile should remain consistent. In Makefile it now reads

ifdef DEBUG
    DEBUG_FLAGS ?= -g -O0
# Add this to get some additional runtime checks.
# Warning: it's incompatible with tools like Valgrind and you have to add it to the app using this lib too
#	DEBUG_FLAGS += -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all
    override DEBUG_FLAGS += -DNDEBUG=1
else
    DEBUG_FLAGS ?= -g -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all # not every compiler(version) supports -Og
endif

$(OUT_DIR)/$(OUTLIB)* $(OUT_DIR)/util/$(OUTBIN) $(OUT_DIR)/util/icvutil.o

clean:
$(MAKE) -C util clean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent - $(MAKE) util is still part of build_all,
but you moved $(MAKE) -C util clean from clean_all to clean.

$(MAKE) COMPILE_TYPE=$(COMPILE_TYPE) build_only

util:
util: $(OUT_DIR)/$(OUTLIB)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better:
util: build_only

Comment on lines +159 to +161
build_all:
$(MAKE) build
$(MAKE) util
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants