diff options
author | Michael Andres <ma@suse.de> | 2011-10-11 13:46:37 +0200 |
---|---|---|
committer | Michael Andres <ma@suse.de> | 2011-10-11 13:46:37 +0200 |
commit | 79b17d8101543cefcf93a4289a3f01c0936205dd (patch) | |
tree | 5feeef057de5292bfd9d5064560c959d2c8f9552 /CMakeLists.txt | |
parent | 620f1401029df1a2d3f44e167dc5d797ad38ad9a (diff) | |
download | libzypp-bindings-79b17d8101543cefcf93a4289a3f01c0936205dd.tar.gz libzypp-bindings-79b17d8101543cefcf93a4289a3f01c0936205dd.tar.bz2 libzypp-bindings-79b17d8101543cefcf93a4289a3f01c0936205dd.zip |
Use gcc-c++ >= 4.5
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c55386..0aced31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,16 +3,11 @@ # # -cmake_minimum_required(VERSION 2.6) - -if(COMMAND cmake_policy) - cmake_policy(SET CMP0017 NEW) -endif(COMMAND cmake_policy) - +cmake_minimum_required(VERSION 2.8) ENABLE_TESTING() -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fno-strict-aliasing") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fno-strict-aliasing -std=c++0x") # # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked @@ -53,10 +48,10 @@ FIND_PACKAGE(Zypp REQUIRED) # determine zypp version FIND_PROGRAM(READ_LINK readlink) -EXECUTE_PROCESS(COMMAND "${READ_LINK}" ${ZYPP_LIBRARY} OUTPUT_VARIABLE ZYPP_SOFILE) +EXECUTE_PROCESS(COMMAND "${READ_LINK}" "-f" ${ZYPP_LIBRARY} OUTPUT_VARIABLE ZYPP_SOFILE) # match number at end, strip trailing \n by using a sub-match -STRING(REGEX MATCH "([0-9]+)\n$" ZYPP_VERSION "${ZYPP_SOFILE}") +STRING(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+\n$" ZYPP_VERSION "${ZYPP_SOFILE}") SET( ZYPP_VERSION "${CMAKE_MATCH_1}" ) MESSAGE(STATUS "Zypp so library version ${ZYPP_VERSION}") |