On 2006-09-08 14:40, Brandon J. Van Every said: >Benjamin Reed wrote: >> On 9/6/06, Brandon J. Van Every <[EMAIL PROTECTED]> wrote: >> >>> Actually it's not invalid to compile it. That's what a cross-compiler >>> does. It's invalid to run it. CMake already has this distinction >>> between TRY_COMPILE and TRY_RUN, so if TRY_RUN is used inappropriately, >>> that's user error. If CMake knows it's in some kind of >>> cross-compilation mode, it can disallow TRY_RUN and deliver an error. >> >> I don't know if this is what he meant, but at least as far as >> universal binaries are concerned, TRY_COMPILE *can* cause issues. >> >> For example, there are a number of autotool'd things that I have built >> as universal binaries which fail to build out of the box because they >> do: >> >> * checking endianness... big endian > >But that is a form of TRY_RUN.
CMake's CMakeLists.txt has no TRY_RUN's and only one TRY_COMPILE. Yet, when I build cmake with cmake I see the "checking endianness" message. So now I've more confused. What is doing that check? And surely that check is broken wrt cross compilation, as you say here: >You can't check endianness just by >compiling something, you have to get a result back from running the >program. At least, I'm not thinking of any snippet of code that's >portable, can be compiled on a little endian architecture, and not a big >endian one. Agreed. -- ____________________________________________________________ Sean McBride, B. Eng [EMAIL PROTECTED] Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
