diff --git a/cmake/system.cmake b/cmake/system.cmake index 6b891ca0e..df1095c04 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -382,6 +382,8 @@ if (NEED_PIC) if (NOT NOFORTRAN) if (${F_COMPILER} STREQUAL "SUN") set(FCOMMON_OPT "${FCOMMON_OPT} -pic") + elseif (${F_COMPILER} STREQUAL "NAG") + set(FCOMMON_OPT "${FCOMMON_OPT} -PIC") else () set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC") endif ()