Hello friends,<br><br>I am trying to cross-compile an application from Windows to Linux. My Toolchain file looks like this:<br><br>set(CMAKE_SYSTEM_NAME Linux)<br><br>#specify the cross-compiler<br>set (CMAKE_C_COMPILER /bin/gcc-linux)<br>
set (CMAKE_CXX_COMPILER /bin/g++-linux)<br><br><br>The problem is that I have in my main CMakeLists.txt file the instruction add_definitions ( ) with several flags I need to set for my application.<br><br>The problem is that the last flag I added ( a pre-processor flag) is working fine on C compiler but causing a problem on C++ compiler.<br>
<br>My question is if can I move the add_definition( ) to the Toolchain file to define a different set of flags for each compiler? Is it possible?<br><br>Thanks<br><br>Enrique<br>