Re-indent the CMake refactor to two-space indention
I apologize for this nasty commit, but I somehow overlooked Chandler's
comment to re-indent these files to two space indention. I know this
is a horrible commit, but I figured if it was done quickly after the
first one, not too many conflicts would arise.
Again, I'm sorry and won't do this again.
llvm-svn: 242301
diff --git a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake b/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
index e0913bf..c37b3ad 100644
--- a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
+++ b/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
@@ -20,54 +20,54 @@
print *, \"Hello World!\"
end program hello")
- set(failed_regexes "[Ee]rror;[Uu]nknown;[Ss]kipping")
- if(CMAKE_VERSION VERSION_GREATER 3.1 OR CMAKE_VERSION VERSION_EQUAL 3.1)
- include(CheckFortranSourceCompiles)
- check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
- set(${boolean} ${${boolean}} PARENT_SCOPE)
- return()
+ set(failed_regexes "[Ee]rror;[Uu]nknown;[Ss]kipping")
+ if(CMAKE_VERSION VERSION_GREATER 3.1 OR CMAKE_VERSION VERSION_EQUAL 3.1)
+ include(CheckFortranSourceCompiles)
+ check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
+ set(${boolean} ${${boolean}} PARENT_SCOPE)
+ return()
+ else()
+ # Our manual check for cmake versions that don't have CheckFortranSourceCompiles
+ set(base_dir ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_flag_check)
+ file(MAKE_DIRECTORY ${base_dir})
+ file(WRITE ${base_dir}/fortran_source.f "${fortran_source}")
+
+ message(STATUS "Performing Test ${boolean}")
+ execute_process(
+ COMMAND ${CMAKE_Fortran_COMPILER} "${flag}" ${base_dir}/fortran_source.f
+ WORKING_DIRECTORY ${base_dir}
+ RESULT_VARIABLE exit_code
+ OUTPUT_VARIABLE OUTPUT
+ ERROR_VARIABLE OUTPUT
+ )
+
+ if(${exit_code} EQUAL 0)
+ foreach(regex IN LISTS failed_regexes)
+ if("${OUTPUT}" MATCHES ${regex})
+ set(retval FALSE)
+ endif()
+ endforeach()
else()
- # Our manual check for cmake versions that don't have CheckFortranSourceCompiles
- set(base_dir ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/fortran_flag_check)
- file(MAKE_DIRECTORY ${base_dir})
- file(WRITE ${base_dir}/fortran_source.f "${fortran_source}")
-
- message(STATUS "Performing Test ${boolean}")
- execute_process(
- COMMAND ${CMAKE_Fortran_COMPILER} "${flag}" ${base_dir}/fortran_source.f
- WORKING_DIRECTORY ${base_dir}
- RESULT_VARIABLE exit_code
- OUTPUT_VARIABLE OUTPUT
- ERROR_VARIABLE OUTPUT
- )
-
- if(${exit_code} EQUAL 0)
- foreach(regex IN LISTS failed_regexes)
- if("${OUTPUT}" MATCHES ${regex})
- set(retval FALSE)
- endif()
- endforeach()
- else()
- set(retval FALSE)
- endif()
-
- if(${retval})
- set(${boolean} 1 CACHE INTERNAL "Test ${boolean}")
- message(STATUS "Performing Test ${boolean} - Success")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing Fortran Compiler Flag test ${boolean} succeeded with the following output:\n"
- "${OUTPUT}\n"
- "Source file was:\n${fortran_source}\n")
- else()
- set(${boolean} "" CACHE INTERNAL "Test ${boolean}")
- message(STATUS "Performing Test ${boolean} - Failed")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Performing Fortran Compiler Flag test ${boolean} failed with the following output:\n"
- "${OUTPUT}\n"
- "Source file was:\n${fortran_source}\n")
- endif()
+ set(retval FALSE)
endif()
- set(${boolean} ${retval} PARENT_SCOPE)
+ if(${retval})
+ set(${boolean} 1 CACHE INTERNAL "Test ${boolean}")
+ message(STATUS "Performing Test ${boolean} - Success")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing Fortran Compiler Flag test ${boolean} succeeded with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${fortran_source}\n")
+ else()
+ set(${boolean} "" CACHE INTERNAL "Test ${boolean}")
+ message(STATUS "Performing Test ${boolean} - Failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing Fortran Compiler Flag test ${boolean} failed with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${fortran_source}\n")
+ endif()
+ endif()
+
+ set(${boolean} ${retval} PARENT_SCOPE)
endif()
endfunction()