On 12/07/2010 05:15 PM, Convey, Christian J CIV NUWC NWPT, B-171 wrote: > Any suggest for the most-proper way, in a CMakeLists.txt file, to determine > whether the Intel vs. GNU fortran compiler will be used? > > I need to use different sets of source files, and different compiler flags, > depending on that detail. > > Christian Convey
I think the CMAKE_Fortran_COMPILER_ID variable should do the job... if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) message(STATUS "Using GNU Fortran compiler") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) message(STATUS "Using Intel Fortran compiler") else() message(STATUS "Using unknown Fortran compiler") endif() Michael _______________________________________________ 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