Filter linker inputs? ld returns "file not recognized: File format not recognized" (e.g. h->gch files)
I'm trying to realize precompiled-headers via an approach where a new language is established. I keep running into one hitch after the next as I try to generalize the process to be more complete and professional.
In this instance, I would like to include the header in the project's sources, so that end-users see all of the source code in the generated output.
CMake 3.9.0 sees the precompiled-header and since it's assigned to this "language" it generates a build rule, that puts a dependency on the build-target for the GCH file that the new "language" generates.
First, let me say, that I think giving headers to the targets in this way causes all kinds of problems, but this is how CMake works, so.
I've tried modifying the EXTENSIONS variables from here ( https://cmake.org/Wiki/CMake_Useful_Variables#Variables_not_listed_here ) but have not achieved anything.
The problem is CMake passes the GCH via the linker inputs. I can't find a mechanism to have it be ignored. I realize that probably only Visual Studio retains the headers, however I would like to not have to wrap conditions around their inclusion, or assume knowledge about the build environment.
Thoughts? Fixes? (Maybe this is not an Issue proper, but I'm stumped and unsure who to turn to.) Thanks!