Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63102

qmake generate Makefile with wrong include file dependence

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.9.1
    • Build tools: qmake
    • None
    • Kubuntu 17.04 x64

      Qt 5.9.1

      QtCreator 4.4.0

    Description

      project file

      cpptest06.pro
      QT -= core
      QT -= gui
      
      CONFIG += c++14 console
      CONFIG -= app_bundle
      
      DEFINES += INCLUDE_ME
      
      SOURCES += main.cpp
      
      HEADERS += \
          include_me.h
      
      
      main.cpp
      #if defined(INCLUDE_ME)
      #include "include_me.h"
      #else
      #include "dont_include_me.h"
      #endif
      
      int main()
      {
          return 0;
      }
      
      

      when file "dont_include_me.h" does not exists Makefile is correct

      Makefile
      ...
      ####### Compile
      
      main.o: ../testcpp06/main.cpp ../testcpp06/include_me.h
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../testcpp06/main.cpp
      ...
      

      but when file "dont_include_me.h" exists in source or even build directory

      Makefile
      ...
      ####### Compile
      
      main.o: ../testcpp06/main.cpp ../testcpp06/include_me.h \
      		dont_include_me.h
      	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../testcpp06/main.cpp
      ...
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              buddenha Oswald Buddenhagen
              spise Andrew Sposobin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes