Skip to content

Commit

Permalink
Set NOFLAGS to 1 for C++ compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
HiGarfield committed Jan 20, 2025
1 parent 3a5b46d commit b273bda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ override CFLAGS += -Wunsafe-loop-optimizations
endif # $(CC) = gcc
endif # CHECK = 1

# Set NOFLAGS to 1 for C++ compilers
ifeq ($(findstring ++, $(CC)), ++)
NOFLAGS := 1
endif

# If NOFLAGS is set to 1, set CFLAGS and LDFLAGS to empty
ifeq ($(NOFLAGS), 1)
override CFLAGS :=
Expand Down
5 changes: 5 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ override CFLAGS += -Wunsafe-loop-optimizations
endif # $(CC) = gcc
endif # CHECK = 1

# Set NOFLAGS to 1 for C++ compilers
ifeq ($(findstring ++, $(CC)), ++)
NOFLAGS := 1
endif

# If NOFLAGS is set to 1, set CFLAGS and LDFLAGS to empty
ifeq ($(NOFLAGS), 1)
override CFLAGS :=
Expand Down

0 comments on commit b273bda

Please sign in to comment.