This question was asked a while ago: http://www.cmake.org/pipermail/cmake/2009-June/030404.html with no definitive answer.. So, I'll try to raise this issue from a different angle, perhaps this will make more sense to the developers.
Take a look at this line: cmake \ -DCMAKE_CXX_COMPILER=icpc \ -DCMAKE_C_COMPILER=icc \ -DCMAKE_Fortran_COMPILER=ifort \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O2 -g -debug inline-debug-info' \ -DCMAKE_C_FLAGS_RELWITHDEBINFO='-O2 -g -debug inline-debug-info' \ -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO='-O2 -g -debug inline-debug-info' \ -DBLA_VENDOR=Intel \ -DBLA_BLA \ /path/to/source Now, the thing I want to emphasize about this "configuration" line is that the settings are not specific to a given project. It just "activates" a custom compiler suite. Another perfectly reasonable scenario is further refinements made for specific platforms. And, really, compilation being cross or native is an orthogonal issue here. The earlier dialog was: >> [Will Dicharry wrote:] >> Am I misusing the toolchain file capability? > [Bill Hoffman wrote:] > Yes, that should only be used for cross-compiling. > To set the compilers you can set the environment variables FC, CC, and CXX > before running CMake. So, now my question is, how can I reduce the above cmake configure line muddied with plethora of compiler (and/or platform) specific definitions (or preceding environment variables for that matter) into: cmake -DCMAKE_OK_NOT_TOOLCHAIN_BUT_WHAT_FILE=site/macros/intel.cmake /path/to/source ? Levent
_______________________________________________ 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://www.cmake.org/mailman/listinfo/cmake
