FWGS / hlsdk-portable

Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
https://xash.su
Other
267 stars 119 forks source link

Speedup cmake configuration on Windows #355

Closed FreeSlave closed 1 year ago

FreeSlave commented 1 year ago

Due to a big number of platform checks the initial cmake configuration on Windows is pretty slow. It mostly affects automated builds as it always starts as an initial build in the container.

The goal of this PR is to increase the awareness on the problem and maybe spark a discussion on possible solutions. This might be not suitable for merging into master branch.

a1batross commented 1 year ago

CMake should support either querying list of defined symbols, or defined value, or finally have multithreaded configure.

Maybe precomipiling build.h may help? Btw newer engine version is even more complex and importing it can make CMake checks even more slower.

a1batross commented 1 year ago

Few other ideas:

a1batross commented 1 year ago

As for compiling on the target machine, you can just compile Q_buildarch and Q_buildos functions from the engine, these are completely standalone and then parse the output, it also was made to be easily parseable with simple regex.

a1batross commented 1 year ago

See the alternative solution in https://github.com/FWGS/hlsdk-portable/pull/368

FreeSlave commented 1 year ago

Closing as it got resolved in https://github.com/FWGS/hlsdk-portable/pull/368