From e9c984267e5539b798a2b1af8431e5715f261cfd Mon Sep 17 00:00:00 2001 From: Neil Carlson Date: Tue, 9 Aug 2016 11:14:13 -0400 Subject: [PATCH] NAG: Use -PIC for Fortran position-independent executable code The Numerical Algorithms Group (NAG) Fortran compiler documents -PIC for position-independent code and does not have a separate option for PIE. We added `-PIC` for PIC in commit v2.8.11~174^2 (NAG: Use -PIC for Fortran position-independent code, 2013-02-18). Follow up for PIE. Closes: #16236 --- Modules/Compiler/NAG-Fortran.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake index 18f141ed3..39aae1883 100644 --- a/Modules/Compiler/NAG-Fortran.cmake +++ b/Modules/Compiler/NAG-Fortran.cmake @@ -33,3 +33,4 @@ set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free") set(CMAKE_Fortran_COMPILE_OPTIONS_PIC "-PIC") +set(CMAKE_Fortran_COMPILE_OPTIONS_PIE "-PIC")