[Cmake-commits] [cmake-commits] king committed CheckFortran.cmake 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 15 14:03:04 EST 2009


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv30361/Tests

Modified Files:
	CheckFortran.cmake 
Log Message:
Honor real language flags in FortranC.Flags test

The test overrides the CMAKE_C_FLAGS and CMAKE_Fortran_FLAGS to test
passing a specific flag to the compiler wrapper scripts.  We fix it to
honor any outside flags needed for the real compiler.


Index: CheckFortran.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CheckFortran.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CheckFortran.cmake	10 Dec 2009 17:16:38 -0000	1.1
--- CheckFortran.cmake	15 Dec 2009 19:03:02 -0000	1.2
***************
*** 16,24 ****
    set(_desc "Looking for a Fortran compiler")
    message(STATUS ${_desc})
    file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran/CMakeLists.txt"
      "cmake_minimum_required(VERSION 2.4)
  project(CheckFortran Fortran)
  file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
!   \"set(CMAKE_Fortran_COMPILER \\\"\${CMAKE_Fortran_COMPILER}\\\")\\n\")
  ")
    execute_process(
--- 16,27 ----
    set(_desc "Looking for a Fortran compiler")
    message(STATUS ${_desc})
+   file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran)
    file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran/CMakeLists.txt"
      "cmake_minimum_required(VERSION 2.4)
  project(CheckFortran Fortran)
  file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
!   \"set(CMAKE_Fortran_COMPILER \\\"\${CMAKE_Fortran_COMPILER}\\\")\\n\"
!   \"set(CMAKE_Fortran_FLAGS \\\"\${CMAKE_Fortran_FLAGS}\\\")\\n\"
!   )
  ")
    execute_process(
***************
*** 43,45 ****
--- 46,50 ----
    set(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER}" CACHE FILEPATH "Fortran compiler")
    mark_as_advanced(CMAKE_Fortran_COMPILER)
+   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" CACHE STRING "Fortran flags")
+   mark_as_advanced(CMAKE_Fortran_FLAGS)
  endif()



More information about the Cmake-commits mailing list