Commit b28a9e84 authored by Vinson Lee's avatar Vinson Lee

cmake: Use C++ compiler to link C programs if using Solaris Studio.

Fixes Solaris Studio build.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50802Signed-off-by: Vinson Lee's avatarVinson Lee <vlee@freedesktop.org>
parent 5e8bd3e2
......@@ -158,6 +158,14 @@ if (MINGW)
endif ()
endif ()
if (${CMAKE_C_COMPILER_ID} STREQUAL "SunPro")
# Use C++ to link C files.
# http://developers.sun.com/solaris/articles/mixing.html#linking
# Modified rule from Modules/CMakeCInformation.cmake.
set (CMAKE_C_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif()
if (WIN32)
# MSVC & MinGW only define & use APIENTRY
add_definitions (-DGLAPIENTRY=__stdcall)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment