Skip to content

Commit cac974e

Browse files
author
shawke
committed
Fix compatibility with older versions of CMake
The "SONAME_FLAG" was introduced in CMake 2.8.9, while the current CMake scripts require 2.8.4 (first line of CMakeLists.txt). Increasing the required CMake version will block building in less recent OSes (e.g., for Ubuntu 12.04 LTS, the latest version from the official repositories is currently 2.8.7). The more compatible solution will be to use the old variable name, i.e. the one which was used before CMake was patched. NB: this issue is triggered upon specifying -DBUILD_SHARED_LIBS=ON. Related bug report: http://public.kitware.com/Bug/view.php?id=13884 Commit which implemented this new variable: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1409ac5
1 parent 07031f9 commit cac974e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/CMakeCXXInformation.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ include(CMakeCommonLanguageInclude)
256256
# create a shared C++ library
257257
if(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
258258
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
259-
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
259+
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
260260
endif()
261261

262262
# create a c++ shared module copy the shared library rule by default

0 commit comments

Comments
 (0)