(*) The radopt tests do not work - need to figure out how to
autogenerate the executables during configuration without shell
scripts (not portable to windows).

(*) the perl test suite does not find any of the sacado tests.  Seems to be happening for perl 5.10.0.  

(*) Need to turn off the paramlib and nested fad support when on sun
compilers.  Question is in to cmake as to how to figure out the
compiler type.  Email exchange relevant to this problem:


Here is some CMake code that I wrote to determine this:



# Determine compiler version

INCLUDE(CheckCXXSourceCompiles)

CHECK_CXX_SOURCE_COMPILES(
"
int main() {
#ifdef __sun
  // This is the SUN!
#else
  THIS IS NOT THE SUN
#endif
  return 0;
}
"
Trilinos_USING_SUN_COMPILER
)



I was going to put this into a module called CheckCXXDefineExists.cmake with the function CHECK_CXX_DEFINE_EXISTS(...) that would be used like:

CHECK_CXX_DEFINE_EXISTS(__sun Trilinos_USING_SUN_COMPILER)

CMake does not appear to have a module/macro like this.

Should I define this module/function and would CMake like to have it to add to its sources?

- Ross


> > -----Original Message-----
> > From: Eric Noulard [mailto:eric.noulard@gmail.com] 
> > Sent: Wednesday, December 03, 2008 4:06 PM
> > To: Bartlett, Roscoe A
> > Cc: cmake@cmake.org; Pawlowski, Roger P
> > Subject: Re: [CMake] How do you determine what compiler is being used?
> > 
> > 2008/12/3 Bartlett, Roscoe A <rabartl@sandia.gov>:
>> > > Hello,
>> > >
>> > > How can determine what general type of compiler is being used?  For 
>> > > example, how can we determine if our project is being configured to 
>> > > use the Sun CC compiler?  In C++ code I can just check for 
> > the define 
>> > > __sun but how can I get this info in my CMakeLists.txt 
> > file?  I could 
>> > > use try_compile(...) to figure this out but is there 
> > already a way to do this?
> > 
> > There are some variables like
> > CMAKE_COMPILER_IS_GNUCC
> > MINGW
> > MSVC
> > 
> > but there is nothing for Sun CC
> > http://www.cmake.org/Wiki/CMake_Useful_Variables
> > 
> > You may guess it using
> > CMAKE_C_COMPILER
> > which contains the full path to the compiler.
> > 
> > may be the set of recognized compilers may be enhanced using 
> > macro predefined by those compilers:
> > http://predef.sourceforge.net/precomp.html
> > 
> > --
> > Erk
> > 
