Use CMake's builtin functionality for PCHs
authorBen Clayton <bclayton@google.com>
Tue, 7 Jul 2020 12:24:04 +0000 (13:24 +0100)
committerBen Clayton <bclayton@google.com>
Tue, 7 Jul 2020 15:44:19 +0000 (16:44 +0100)
commit31cad22758bb6ee1f2bdf8773b4f0c2b8996f7fc
treed89d97c805b44a773342ade6a7d6686d4fb243f8
parent3604be156c1e297145cf10bd7057b5504fd35588
Use CMake's builtin functionality for PCHs

`glslang_pch()` did manual mangling of the compiler flags to enable pre-compiled headers.
I couldn't get this approach to work with the `MachineIndependent` subdirectory, but fortunately CMake has added first-class support for precompiled headers in 3.16, which does work with subdirectories.

Moved `glslang_pch()` to the other global function declarations.

`glslang_pch()` is a no-op when using CMake earlier than `3.16`.

CMake's PCH implementation does not need the `pch.cpp` files, so just remove them.
BUILD.bazel
CMakeLists.txt
glslang/CMakeLists.txt
glslang/HLSL/pch.cpp [deleted file]
glslang/MachineIndependent/pch.cpp [deleted file]
gtests/CMakeLists.txt
gtests/pch.cpp [deleted file]