[CMake] Best way to sniff for Fortran compiler?
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 Scientist, NUWC Division Newport 1176 Howell St., Newport, RI 02842 email: christian.con...@navy.mil phone: (401) 832-6824 fax: (401) 832-4749 smime.p7s Description: S/MIME cryptographic signature ___ 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
Re: [CMake] Best way to sniff for Fortran compiler?
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