<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I would like a build setup for a project to work correctly for both native and cross compilation, however one part requires native compilation and execution of the binary to generate some data tables as part of the build process (the temporary native binary is then discarded / not installed).</div><div dir="auto"><br></div><div dir="auto">What I seem to be unable to figure out is how to specify the compiler(s) and flags separately for the native and cross compiler. I want them to be specified by the user or package manager rather than the author of cmake files.</div><div dir="auto"><br></div><div dir="auto">One particular problem is when cross-compiling on mac with mingw (gcc) while using clang as the native compiler (the two compilers have incompatible flags).</div><div dir="auto"><br></div><div dir="auto">How can I specify two sets of compilers and flags at configure time? (The same question puzzles me in autoconf world as well. Please don't say that the native compiler should be found automatically as I really need to specify which one to use, ancient systems don't have support for C++11 with the default compiler etc.)</div><div dir="auto"><br></div><div dir="auto">Thank you very much,</div><div dir="auto">    Mojca</div><div dir="auto"><br></div></div>