components/cmake/patches/02-sunos-cmake.patch
author April Chin <april.chin@oracle.com>
Wed, 11 Nov 2015 12:06:59 -0800
changeset 5081 198d4a3e4b73
permissions -rw-r--r--
21834219 update cmake to 3.3.2 22121918 enable system-test target for cmake

The first set of lines removed by this patch is committed upstream:
https://github.com/Kitware/CMake/commit/60fe4b540b40330e050dbd755204cecbc62d6a37
to fix
https://public.kitware.com/Bug/view.php?id=15673
0015673: CMAKE_C_COMPILER is used to link a CXX shared library on Solaris
and may be removed when cmake is updated to version 3.4 or later.

Linking C++ libraries with the C compiler is not needed; it causes the compiler
driver to not include libraries that need to be linked to the resulting
library (such as libstdc++ in the case of gcc).

The second set of lines removed by this patch will be submitted upstream.
It removes use of historical directories which are no longer used.
Any version of Studio from the last five years should automatically set
the correct paths.

--- cmake-3.3.2/Modules/Platform/SunOS.cmake	Wed Sep 16 08:53:05 2015
+++ cmake-3.3.2/Modules/Platform/SunOS.cmake	Fri Oct 30 13:15:54 2015
@@ -7,22 +7,8 @@
    set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
 endif()
 
-if(CMAKE_COMPILER_IS_GNUCXX)
-  if(CMAKE_COMPILER_IS_GNUCC)
-    set(CMAKE_CXX_CREATE_SHARED_LIBRARY
-        "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>  <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-  else()
-    # Take default rule from CMakeDefaultMakeRuleVariables.cmake.
-  endif()
-endif()
 include(Platform/UnixPaths)
 
-# Add the compiler's implicit link directories.
-if("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
-  list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
-    /opt/SUNWspro/lib /opt/SUNWspro/prod/lib /usr/ccs/lib)
-endif()
-
 # The Sun linker needs to find transitive shared library dependencies
 # in the -L path.
 set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)