Brad King wrote: > On 04/24/2013 08:38 AM, Stephen Kelly wrote: >> I pushed a set-sysroot branch implementing this to my clone. This >> actually also makes it possible to cross-compile for android without >> forcing the compiler. > > That looks like a good start. The "--sysroot" flag should be looked > up through a platform information variable set in Modules/Platform/* > or Modules/Compiler/*.
That seems like a good idea. It would ensure that we don't erroneously add the flag to compilers that don't support it. I initially added it to Modules/Platform/GNU.cmake, but that failed during the testing the c++ compiler stage (for android) because the CMAKE_SYSROOT_FLAG was apparently not defined yet then, so I've added it to Modules/Compiler/GNU.cmake instead. I assume that is also read by clang, so I'll try to test the flag with that too if I can figure out how to cross compile with clang. I assume it is used by icc too, but I can't test that. Thanks, Steve. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers