Skip to content

Commit

Permalink
Remove special rule building flex genned source file
Browse files Browse the repository at this point in the history
I tried a special Qt project rule for building the
flex generated source file with -Wno-sign-compare,
but the rule didn't work in Github CI, so am taking
out the special compile rule.

The downside is that there is now warning with the
flex code build.
  • Loading branch information
keithvetter committed Aug 15, 2024
1 parent daef7a1 commit ff8d619
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions libkoviz/libkoviz.pro
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ BISONSOURCES = product_parser.y
flexsource.input = FLEXSOURCES
flexsource.output = $$PWD/${QMAKE_FILE_BASE}.cpp
flexsource.commands = $$FLEX_COMMAND
flexsource.variable_out = FLEX_DUMMY_SOURCE
flexsource.variable_out = SOURCES
flexsource.name = Flex Sources ${QMAKE_FILE_IN}
flexsource.CONFIG += target_predeps
QMAKE_EXTRA_COMPILERS += flexsource
Expand All @@ -246,21 +246,6 @@ flexheader.name = Flex Headers ${QMAKE_FILE_IN}
flexheader.CONFIG += target_predeps no_link
QMAKE_EXTRA_COMPILERS += flexheader

# This block used to compile product_lexer.cpp with -Wno-sign-compare
# to get around flex genning code that has gcc sign compare warning
FLEX_CPP = product_lexer.cpp
FLEX_OBJ = $$OBJECTS_DIR/product_lexer.o
compileflex.input = $$FLEX_CPP
compileflex.output = $$FLEX_OBJ
compileflex.commands = $(CXX) -c $(CXXFLAGS) -Wno-sign-compare \
$(INCPATH) -o $$FLEX_OBJ $$FLEX_CPP
QMAKE_EXTRA_COMPILERS += compileflex
unix {
QMAKE_POST_LINK += $$quote(ar cqs $$DESTDIR/lib$${TARGET}.a $$FLEX_OBJ)
} else:win32 {
QMAKE_POST_LINK += $$quote(lib /OUT:$$DESTDIR/lib$${TARGET}.lib $$FLEX_OBJ)
}

bisonsource.input = BISONSOURCES
bisonsource.output = $$PWD/${QMAKE_FILE_BASE}.cpp
bisonsource.commands = $$BISON_COMMAND
Expand Down

0 comments on commit ff8d619

Please sign in to comment.