On Wed, Dec 3, 2008 at 9:48 PM, Bill Hoffman <[EMAIL PROTECTED]>wrote:
> This is already done in CMake 2.6. See Modules/CMakeCCompilerId.c.in, it > is even better than the above because it works when cross compiling. It does > not use a try-run, but rather a try-compile, and then it looks for strings > in the executable that was created. > > Anyway, it is already done, and it sets the following variables: > > CMAKE_C_COMPILER_ID > CMAKE_CXX_COMPILER_ID > CMAKE_Fortran_COMPILER_ID Thanks for adding this Bill. With the exception of dealing with MinGW or differing versions of MSVC this would seem to be a very good replacement for conditionals like: IF(CMAKE_COMPILER_IS_GNUCC) IF(MSVC) Is this feature here to stay? The documentation doesn't seem very encouraging. =) - *CMAKE_<LANG>_COMPILER_ID*: An internal variable subject to change. This is used in determining the compiler and is subject to change. -- Philip Lowman
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake