Line 0
Link Here
|
|
|
1 |
--- Modules/Compiler/GNU-Fortran.cmake.orig 2016-03-18 02:08:11 UTC |
2 |
+++ Modules/Compiler/GNU-Fortran.cmake |
3 |
@@ -13,3 +13,13 @@ unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran) |
4 |
|
5 |
# Fortran-specific feature flags. |
6 |
set(CMAKE_Fortran_MODDIR_FLAG -J) |
7 |
+ |
8 |
+# Find out where gfortran thinks that libgcc_s should come from. |
9 |
+execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgcc_s.so |
10 |
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
11 |
+ OUTPUT_VARIABLE _D1) |
12 |
+ |
13 |
+# Map that to a sensible directory. |
14 |
+get_filename_component(_D2 ${_D1} DIRECTORY) |
15 |
+get_filename_component(_D3 ${_D2} ABSOLUTE) |
16 |
+set(CMAKE_Fortran_RPATH ${_D3}) |