[Lldb-commits] [lldb] r213469 - build: fix cmake warning with newer CMake

Zachary Turner zturner at google.com
Sun Jul 20 13:17:55 PDT 2014


Was this the warning about mismatched keyword arguments?  If so, big +1 and
thanks for fixing this.  Was very annoying.


On Sat, Jul 19, 2014 at 10:28 PM, Saleem Abdulrasool <compnerd at compnerd.org>
wrote:

> Author: compnerd
> Date: Sun Jul 20 00:28:55 2014
> New Revision: 213469
>
> URL: http://llvm.org/viewvc/llvm-project?rev=213469&view=rev
> Log:
> build: fix cmake warning with newer CMake
>
> Hoist the compatibility macros out a level and re-use them when adding link
> dependencies.  Silences a warning from CMake.
>
> Modified:
>     lldb/trunk/CMakeLists.txt
>     lldb/trunk/source/CMakeLists.txt
>
> Modified: lldb/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=213469&r1=213468&r2=213469&view=diff
>
> ==============================================================================
> --- lldb/trunk/CMakeLists.txt (original)
> +++ lldb/trunk/CMakeLists.txt Sun Jul 20 00:28:55 2014
> @@ -197,6 +197,16 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[
>    ${PACKAGE_VERSION})
>  message(STATUS "LLDB version: ${LLDB_VERSION}")
>
> +if (CMAKE_VERSION VERSION_LESS 2.8.12)
> +  set(cmake_2_8_12_INTERFACE)
> +  set(cmake_2_8_12_PRIVATE)
> +  set(cmake_2_8_12_PUBLIC)
> +else ()
> +  set(cmake_2_8_12_INTERFACE INTERFACE)
> +  set(cmake_2_8_12_PRIVATE PRIVATE)
> +  set(cmake_2_8_12_PUBLIC PUBLIC)
> +endif ()
> +
>  macro(add_lldb_library name)
>    llvm_process_sources(srcs ${ARGN})
>    if (MSVC_IDE OR XCODE)
> @@ -222,16 +232,6 @@ macro(add_lldb_library name)
>    ##add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
>    #endif()
>
> -  if (CMAKE_VERSION VERSION_LESS 2.8.12)
> -    set(cmake_2_8_12_INTERFACE)
> -    set(cmake_2_8_12_PRIVATE)
> -    set(cmake_2_8_12_PUBLIC)
> -  else ()
> -    set(cmake_2_8_12_INTERFACE INTERFACE)
> -    set(cmake_2_8_12_PRIVATE PRIVATE)
> -    set(cmake_2_8_12_PUBLIC PUBLIC)
> -  endif ()
> -
>    if ("${libkind}" STREQUAL "STATIC")
>      set(lldb_library_keyword ${cmake_2_8_12_INTERFACE})
>    else ()
>
> Modified: lldb/trunk/source/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=213469&r1=213468&r2=213469&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/CMakeLists.txt (original)
> +++ lldb/trunk/source/CMakeLists.txt Sun Jul 20 00:28:55 2014
> @@ -300,7 +300,7 @@ if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERA
>      ${LLDB_VERS_GENERATED_FILE}
>      )
>  endif()
> -target_link_libraries(liblldb ${LLDB_SYSTEM_LIBS})
> +target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
>
>  # Determine LLDB revision and repository. GetSourceVersion and
> GetRepositoryPath are shell-scripts, and as
>  # such will not work on Windows.
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140720/698ef02b/attachment.html>


More information about the lldb-commits mailing list