![]() is either the basename of the compiler executable, e.g. Once the system and the compiler are determined by CMake, it loads the corresponding files in the following order: If the toolchain is a GNU toolchain, you only need to set one of both. It is handled the same way as CMAKE_C_COMPILER. CMAKE_CXX_COMPILER the C++ compiler executable, may be the full path or just the filename. The compiler can also be preset via the CC environment variables. "arm-elf-gcc") CMake will detect this and automatically find the corresponding C++ compiler (i.e. If this compiler is a gcc-cross compiler with a prefixed name (e.g. If it is specified with full path, then this path will be prefered when searching the C++ compiler and the other tools (binutils, linker, etc.). Since CMake cannot guess the target system, it also cannot guess which compiler it should use, so you have to preset this too: CMAKE_C_COMPILER the C compiler executable, may be the full path or just the filename. You probably only have to set this one if you are using a cross compiler where every target hardware needs special build settings. This variable is not used very much except for one purpose, it is used to load a CMAKE_SYSTEM_NAME-compiler-CMAKE_SYSTEM_PROCESSOR.cmake file, which can be used to modify settings like compiler flags etc. CMAKE_SYSTEM_PROCESSOR optional, processor (or hardware) of the target system. CMAKE_SYSTEM_VERSION optional, version of your target system, not used very much. If CMAKE_SYSTEM_NAME is preset, the CMake variable CMAKE_CROSSCOMPILING is automatically set to TRUE, so this can be used for testing in the CMake files. If your target is an embedded system without OS set CMAKE_SYSTEM_NAME to "Generic". This variable is used for constructing the file names of the platform files like Linux.cmake or Windows-gcc.cmake. ![]() Typical examples are "Linux" and "Windows". the same as CMAKE_SYSTEM_NAME would have if CMake would run on the target system. The following variables have to be preset: CMAKE_SYSTEM_NAME this one is mandatory, it is the name of the target system, i.e. When cross compiling, CMake cannot guess the target system, so you have to preset some CMake variables, e.g. 8 How to cross compile specific projects.7 Information how to set up various cross compiling toolchains.5 Using executables in the build created during the build.2 Searching and finding external software.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |