CMake Server does not provide information useful for cross-compilation
CMake Server already reports CMAKE_SYSROOT as sysroot for each project. Nevertheless, there are few handy variables that could be reported by the server as well. Those variable are:
-
CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
- this variable will append--gcc-toolchain=<var>
when compiling with clang -
CMAKE_<LANG>_COMPILER_TARGET
- this variable will append--target=<var>
when compiling with clang -
CMAKE_<LANG>_COMPILER_ARG1
- this variable is set if the compiler path set from CC/CXX env variables contains more than just the path itself, e.gCXX=g++ -mthumb -mfloat-abi=hard -mfpu=neon-vfpv4 -mcpu=cortex-a15
. This is used by e.g yocto build system
IDEs using libclang could use those variables in order to launch libclang with a correct set of arguments and to find internal defines and internal include paths much more easily.
Edited by Brad King