<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11-Nov-16 21:09, Brad King wrote:<br>
    </div>
    <blockquote
      cite="mid:0bf8b3c5-9372-c98a-45df-351bb591c3ba@kitware.com"
      type="cite">
      <pre wrap="">On 11/10/2016 10:46 PM, Ruslan Baratov wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">the value "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}cpp${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}"
</pre>
      </blockquote>
      <pre wrap="">
This expression is the documented way to get the paths to the Android tools.
I see no reason to add a pre-evaluated copy for every tool.</pre>
    </blockquote>
    Reason is the same as with CMAKE_GDBSERVER variable. Instead of
    forcing users to redefine (probably with different names) this
    variable each time we can do it once in CMake.<br>
    <br>
    <blockquote
      cite="mid:0bf8b3c5-9372-c98a-45df-351bb591c3ba@kitware.com"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">ANDROID_TOOLCHAIN_MACHINE_NAME?
</pre>
      </blockquote>
      <pre wrap="">
In your original message it looked like you needed this only to construct
the path above.</pre>
    </blockquote>
    Nope, this one needed too.<br>
    <br>
    <blockquote
      cite="mid:0bf8b3c5-9372-c98a-45df-351bb591c3ba@kitware.com"
      type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">get_filename_component(ANDROID_TOOLCHAIN_MACHINE_NAME "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}" NAME)
string(REGEX REPLACE "-$" "" ANDROID_TOOLCHAIN_MACHINE_NAME "${ANDROID_TOOLCHAIN_MACHINE_NAME}")
</pre>
      </blockquote>
      <pre wrap="">
AFAICT the only meaning this value has is exactly what that code expresses.

What is your use case for getting this value and why is it needed separately?
</pre>
    </blockquote>
    Even if they may not be needed in regular CMake code such variables
    can be useful "outside". Autotools based projects use
    ANDROID_TOOLCHAIN_MACHINE_NAME variable: `./configure
    --host=${ANDROID_TOOLCHAIN_MACHINE_NAME}`. Preprocessor is required
    too: `CPP=${CMAKE_C_PREPROCESSOR} ./configure`. Variables
    ANDROID_NDK_HOST_SYSTEM_NAME and ANDROID_COMPILER_VERSION is used in
    tool `<span class="pl-s">androiddeployqt` which do build Qt
      application for Android.<br>
      <br>
      Ruslo<br>
      <br>
    </span>
  </body>
</html>