From a9928eb4a54431780d589f70460e5715258f1d27 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Sat, 26 Feb 2022 11:55:42 +0100 Subject: SunPro C: ensure LINKER: prefix is usable for all versions --- Modules/Compiler/SunPro-C.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index c98656f..7a406ac 100644 --- a/Modules/Compiler/SunPro-C.cmake +++ b/Modules/Compiler/SunPro-C.cmake @@ -33,8 +33,13 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE) set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic") endforeach() -set(CMAKE_C_LINKER_WRAPPER_FLAG "-Qoption" "ld" " ") -set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",") +if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "5.12") + set(CMAKE_C_LINKER_WRAPPER_FLAG "-Qoption" "ld" " ") + set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",") +else() + set(CMAKE_C_LINKER_WRAPPER_FLAG "-Wl,") + set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",") +endif() if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") -- cgit v0.12