Re: [Qbs] Exporting Dependencies on generated files

2021-11-15 Thread Björn Schäpers

Am 15.11.2021 um 09:18 schrieb Christian Kandeler:


On 11/12/21 20:33, Björn Schäpers wrote:

This should work if you include "hpp" in the type of the generating product.

Adding "hpp" as type does indeed result in the complete compilation of the 
generating product, before the using product is started. But the files were 
not recompiled if there were changes, so this only helps in the initial build.


There is no difference between initial and subsequent builds in this regard.

> What was I needed is also to Export cpp.treatSystemHeadersAsDependencies: 
true.

That's an unrelated property that's not relevant for headers that are 
artifacts of the project.



Christian


I export the output directory of protobuf as cpp.systemIncludePaths. If I change 
something in my .proto and say build for the depending product within QtCreator 
qbs updates the generated files and only after it starts to compile the 
dependent files, although there were enough idle cores.


Setting the "hpp" type did not have the result, changing the .proto files and 
hitting build did regenerate the headers, but did not recompile the using files, 
resulting in linker errors.


Kind regards,
Björn.

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Exporting Dependencies on generated files

2021-11-15 Thread Christian Kandeler


On 11/12/21 20:33, Björn Schäpers wrote:
This should work if you include "hpp" in the type of the generating 
product.


Adding "hpp" as type does indeed result in the complete compilation of 
the generating product, before the using product is started. But the 
files were not recompiled if there were changes, so this only helps in 
the initial build.


There is no difference between initial and subsequent builds in this regard.

> What was I needed is also to Export 
cpp.treatSystemHeadersAsDependencies: true.


That's an unrelated property that's not relevant for headers that are 
artifacts of the project.



Christian

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Exporting Dependencies on generated files

2021-11-12 Thread Björn Schäpers

Am 04.11.2021 um 12:45 schrieb Christian Kandeler:

On 11/4/21 11:22, Björn Schäpers wrote:
we have a static library which uses Protobuf, thus generates the headers, and 
compiles the code directly into it.


Static Library {
  ...
  Export {
    Depends { name: "cpp" }
    Depends { name: "protobuf.cpp" }
    cpp.systemIncludePaths: [product.protobuf.cpp.outputDir]
  }
}

And some products which depend on that, but qbs does not order files of the 
dependent products which include the generated headers after the generation 
of these.


Is there a way to ideally make the files which include to depend on the 
header generation, or at least block all actions on the dependent product 
wait until the static library is build?


This should work if you include "hpp" in the type of the generating product.


Christian


Adding "hpp" as type does indeed result in the complete compilation of the 
generating product, before the using product is started. But the files were not 
recompiled if there were changes, so this only helps in the initial build.


What was I needed is also to Export cpp.treatSystemHeadersAsDependencies: true.

Regards,
Björn.

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Exporting Dependencies on generated files

2021-11-04 Thread Christian Kandeler

On 11/4/21 11:22, Björn Schäpers wrote:
we have a static library which uses Protobuf, thus generates the 
headers, and compiles the code directly into it.


Static Library {
  ...
  Export {
    Depends { name: "cpp" }
    Depends { name: "protobuf.cpp" }
    cpp.systemIncludePaths: [product.protobuf.cpp.outputDir]
  }
}

And some products which depend on that, but qbs does not order files 
of the dependent products which include the generated headers after 
the generation of these.


Is there a way to ideally make the files which include to depend on 
the header generation, or at least block all actions on the dependent 
product wait until the static library is build?


This should work if you include "hpp" in the type of the generating product.


Christian

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


[Qbs] Exporting Dependencies on generated files

2021-11-04 Thread Björn Schäpers

Hi there,

we have a static library which uses Protobuf, thus generates the headers, and 
compiles the code directly into it.


Static Library {
  ...
  Export {
Depends { name: "cpp" }
Depends { name: "protobuf.cpp" }
cpp.systemIncludePaths: [product.protobuf.cpp.outputDir]
  }
}

And some products which depend on that, but qbs does not order files of the 
dependent products which include the generated headers after the generation of 
these.


Is there a way to ideally make the files which include to depend on the header 
generation, or at least block all actions on the dependent product wait until 
the static library is build?


If not, where would I have to look to implement stuff like that?

Kind Regards,
Björn.
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs