[CMake] virtual machine project, cross compiling question

Vania Joloboff vania.joloboff at inria.fr
Wed Jan 27 10:48:17 EST 2016


Hi

Our project is a virtual machine.
All of the VM software must be compiled for the host platform.
But, since the software is a VM emulating some target platform
the VM tests must be cross compiled for the target.
And we have several targets.
Thus, in the top VM build the CMAKE_CROSSCOMPILING flag
must not be set to true.

But if we set the CMAKE_CROSSCOMPILING flag into
a test subdirectory and change the variables such as CMAKE_C_COMPILER
for the corresponding target platform in some nested CMakeLists.txt
what is the scope of the change ?

Will it change the value of the variable for all future accesses
or these variables have a directory and sub-directories scope ?

This is not clear in the documentation.

Vania




More information about the CMake mailing list