I'm creating cmake toolchain description for my compiler (for example let's name it MYCC) based on clang, so it's identified as Clang during compiler identification:
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
But MYCC doesn't really supports all the things (flags like -fPIC), that Clang does, and I want it to be identified as MYCC, not Clang. I also want my clients to see:
-- The C compiler identification is MYCC
-- The CXX compiler identification is MYCC
I can't use CMakeForceCompiler because it is deprecated (https://cmake.org/cmake/help/v3.0/module/CMakeForceCompiler.html).
I found that IDs is hardcoded in https://github.com/Kitware/CMake/blob/master/Modules/CMakeCompilerIdDetection.cmake
Is there any way to have my own compiler ID without patching this file?