hlsdk-portable icon indicating copy to clipboard operation
hlsdk-portable copied to clipboard

Platform checks are slow on Windows

Open FreeSlave opened this issue 3 years ago • 5 comments

Not a bug, just a noticeable inconvenience. Platform checks during the project configuration (Looking for XASH_...) are much slower on Windows than on Linux.

FreeSlave avatar Jul 09 '22 20:07 FreeSlave

Same problem in PrimeXT

SNMetamorph avatar Jul 09 '22 20:07 SNMetamorph

CMake already has internal checks for different platforms, so may be not good idea to check every symbol in build.h.

nekonomicon avatar Jul 09 '22 20:07 nekonomicon

CMake already has internal checks for different platforms, so may be not good idea to check every symbol in build.h.

No it doesn't. You can't get target processor just from CMake.

CMake also could have multithreaded checks but it doesn't.

a1batross avatar Jul 10 '22 05:07 a1batross

I wish we could just get all defined macros on MSVC, as we can do on GCC or Clang. But the needed feature was only added in only recent MSVC.

And remember we still have to target WinXP...

a1batross avatar Jul 10 '22 05:07 a1batross

Just a quick thoughts.

What if build.h will be precompiled header? Will it fix slow checks? Though I don't see how CMake can leverage precompiled headers for CheckSymbolExists.

Script can also be redone so more probable checks done first and if they are true, no further checks are done. Many variables are mutually exclusive, like CPU arch and OS.

a1batross avatar Jul 10 '22 15:07 a1batross

Closing as solved by https://github.com/FWGS/hlsdk-portable/pull/368

FreeSlave avatar Apr 29 '23 19:04 FreeSlave