1

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?

Kirill
  • 11
  • 1
  • 1
  • Probably not possible and probably a duplicate of http://stackoverflow.com/questions/38663731/introduce-a-new-compiler-to-cmake – usr1234567 Aug 04 '16 at 14:44

0 Answers0