[CMake] Strange options for Sun Studio compiler

Brad King brad.king at kitware.com
Wed Oct 25 13:55:09 EDT 2006


Doug Henry wrote:
> Before I commit anything, I would like to verify how cmake is doing its
> compiler detection.  Is everything simply based on name?  I can have cc
> in my path which is gcc, or I can set my path in a way that has cc from
> sun studio.  Is cmake capable of telling the difference?  I have a
> problem where I could have f77 from either set of compilers but each
> requires different compiler options.  Can this be done using cmake?

Alot of it is currently based on name, but you can actually run the
compiler using EXEC_PROGRAM or EXECUTE_PROCESS to determine it's real
identity.  Eventually we may compile/run a small source file that uses
the preprocessor to identify the compiler but that is not yet done.

-Brad


More information about the CMake mailing list