forked from JACoders/OpenJK
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define ARCH_STRING via CMake on Linux, BSD etc.
This is ioquake/ioq3#129, adapted for the OpenJK codebase. GNU and *BSD platforms have a built-in way to determine endianness, so all architectures except x86_64 are in fact treated identically, except that their ARCH_STRING is different. The ARCH_STRING must always be identical to the Architecture from CMake, otherwise the engine will not find its cgame, game and ui plugins under their expected names and startup will fail. If we pass it in from CMake, then an identical value is guaranteed, and we can get rid of an increasingly long list of defined(__some_cpu__) tests. The one remaining quirk is that we test the predefined macro __x86_64__ (on Linux and other GNU platforms) or __amd64__ (on *BSD) to determine whether to define idx64; I've kept that, but separated it from the ARCH_STRING. OpenJK does not distinguish between GNU and *BSD platforms in its build system, so unlike my similar ioquake3 patch, I've included an untested version of the same change for *BSD. Windows and OS X only support a few architectures anyway, so keeping the list up to date is less of a burden there.
- Loading branch information
Showing
3 changed files
with
24 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters