diff options
-rw-r--r-- | Modules/Compiler/SunPro-C.cmake | 9 |
1 files 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") |