Adding language

Is it at all possible to add a language to cmake, properly with full support?
I need to detect if the currently compiled file is this or that language so I need to use for example $<COMPILE_LANGUAGE:Mycompiler> and those generator things, but none of the values I’ve entered in CMakeDetermineMycompilerComplier.cmake are picked up. How can I do that?

AFAIK, full support requires changes to CMake itself these days (for all the genexes that would need implemented for “full” support at least).

Is your language called “Mycompiler” or are you confusing the language with the compiler ID here?

Ok, thanks.
No I’m trying to blow some life in a dormant attempt to add freepascal to use in a mixed C++ and pascal project, and need to pass some parameters to only pascal files. the fpc compiler is a bit too helpful, essentially it’s own build system so it’s tricky making it play nice with cmake.
I guess I’m reduced to some external script variant.

So, you are right, the language is ofc not Mycompiler.

I’l go for “NOTing” CXX, It will work ok.
Would be nice with some documentation of the variables to use in CMakeInformation.cmake such as and, how to use the other necessary files right. Having to delve through /usr/local/share/Modules, guess and trial and error is not a nice development experience.

No, that stuff is just sort of cargo-culted in. If anywhere, the toolchain docs would be the place to add it.