diff options
author | Brad King <brad.king@kitware.com> | 2019-08-22 16:27:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-22 16:27:08 (GMT) |
commit | d911f8fc1294105826809d8c3283120d944fa772 (patch) | |
tree | 157f6b3346521f8e22164d4219e865ee65cad232 /Modules | |
parent | 9182b3ce5346ca0779f93d2f0cc2fbe8a1868b63 (diff) | |
parent | 971c77821350908918b3117e11a89463b6a6a820 (diff) | |
download | CMake-d911f8fc1294105826809d8c3283120d944fa772.zip CMake-d911f8fc1294105826809d8c3283120d944fa772.tar.gz CMake-d911f8fc1294105826809d8c3283120d944fa772.tar.bz2 |
Merge branch 'CrayPrgEnv-update-link-type-detection' into release-3.15
Merge-request: !3716
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/CrayPrgEnv.cmake | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake index e55e587..f6e46ac 100644 --- a/Modules/Compiler/CrayPrgEnv.cmake +++ b/Modules/Compiler/CrayPrgEnv.cmake @@ -69,13 +69,27 @@ endfunction() # note that cmake applies both CMAKE_${lang}_FLAGS and CMAKE_EXE_LINKER_FLAGS # (in that order) to the linking command, so -dynamic can appear in either # variable. +# +# Note: As of CrayPE v19.06 (which translates to the craype/2.6.0 module) +# the default has changed and is now dynamic by default. This is handled +# accordingly function(__cmake_craype_linktype lang rv) # start with ENV, but allow flags to override - if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") - set(linktype dynamic) + if(("$ENV{CRAYPE_VERSION}" STREQUAL "") OR + ("$ENV{CRAYPE_VERSION}" VERSION_LESS "2.6")) + if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") + set(linktype dynamic) + else() + set(linktype static) + endif() else() - set(linktype static) + if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "static") + set(linktype static) + else() + set(linktype dynamic) + endif() endif() + # combine flags and convert to a list so we can apply the flags in order set(linkflags "${CMAKE_${lang}_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") string(REPLACE " " ";" linkflags "${linkflags}") |