Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiler Flags in SUBDIR
Forum Updated to NodeBB v4.3 + New Features

Compiler Flags in SUBDIR

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 210 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Redman
    wrote on last edited by
    #1
    TEMPLATE = subdirs
    
    SUBDIRS = \
            app1 \
            app2\
            app3\
            app4\
    
    # where to find the sub projects - give the folders
    app1 = src/app1
    app2.subdir  = src/app2
    app3.subdir  = src/app3
    app4.subdir = src/app4
    
    # Build optimization
    PRECOMPILED_HEADER = $$PWD/client/app/src/pch.h
    CONFIG += precompile_header
    QMAKE_CXXFLAGS += -MP -O2
    

    Do these optimizations have any effect on this level or do I need to specifiy them for each app.pro?

    jsulmJ 1 Reply Last reply
    0
    • jsulmJ jsulm

      @Redman said in Compiler Flags in SUBDIR:

      Do these optimizations have any effect on this level or do I need to specifiy them for each app.pro?

      You can simply build the whole thing and check what parameters were passed to the compiler.

      R Offline
      R Offline
      Redman
      wrote on last edited by
      #3

      @jsulm Thanks!
      In MakeFile we see -O2 -MD

      CXXFLAGS      = -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -O2 -MD -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc $(DEFINES)
      
      1 Reply Last reply
      0
      • R Redman
        TEMPLATE = subdirs
        
        SUBDIRS = \
                app1 \
                app2\
                app3\
                app4\
        
        # where to find the sub projects - give the folders
        app1 = src/app1
        app2.subdir  = src/app2
        app3.subdir  = src/app3
        app4.subdir = src/app4
        
        # Build optimization
        PRECOMPILED_HEADER = $$PWD/client/app/src/pch.h
        CONFIG += precompile_header
        QMAKE_CXXFLAGS += -MP -O2
        

        Do these optimizations have any effect on this level or do I need to specifiy them for each app.pro?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Redman said in Compiler Flags in SUBDIR:

        Do these optimizations have any effect on this level or do I need to specifiy them for each app.pro?

        You can simply build the whole thing and check what parameters were passed to the compiler.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        R 1 Reply Last reply
        1
        • jsulmJ jsulm

          @Redman said in Compiler Flags in SUBDIR:

          Do these optimizations have any effect on this level or do I need to specifiy them for each app.pro?

          You can simply build the whole thing and check what parameters were passed to the compiler.

          R Offline
          R Offline
          Redman
          wrote on last edited by
          #3

          @jsulm Thanks!
          In MakeFile we see -O2 -MD

          CXXFLAGS      = -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -O2 -MD -std:c++17 -utf-8 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc $(DEFINES)
          
          1 Reply Last reply
          0
          • R Redman has marked this topic as solved on

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved