[Cmake-commits] CMake branch, next, updated. v3.7.1-1477-g70616dc

Brad King brad.king at kitware.com
Fri Dec 2 10:04:43 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  70616dc970a34f4a088862ebcda5ad73da065945 (commit)
       via  dd153de4f0c737f75b545b503b330880001135fe (commit)
      from  99e521434de759bb68f6885a7f199c3af5cc620c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70616dc970a34f4a088862ebcda5ad73da065945
commit 70616dc970a34f4a088862ebcda5ad73da065945
Merge: 99e5214 dd153de
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 2 10:04:42 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 2 10:04:42 2016 -0500

    Merge topic 'asm-splitting' into next
    
    dd153de4 CMakeDetermineASMCompiler: arg-split ASM* env var like CC


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd153de4f0c737f75b545b503b330880001135fe
commit dd153de4f0c737f75b545b503b330880001135fe
Author:     Michał Górny <mgorny at gentoo.org>
AuthorDate: Fri Dec 2 11:26:30 2016 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 2 10:00:34 2016 -0500

    CMakeDetermineASMCompiler: arg-split ASM* env var like CC
    
    Split the arguments off of the `ASM${ASM_DIALECT}` environment variable
    as is done for `CC` and other compiler variables. This fixes using CMake
    when `ASM*` is used to pass additional target flags, e.g. when one uses
    `ASM=${CC}`.

diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index deb10fb..4162726 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -9,7 +9,13 @@ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
 if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
   # prefer the environment variable ASM
   if(NOT $ENV{ASM${ASM_DIALECT}} STREQUAL "")
-    set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
+    get_filename_component(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT $ENV{ASM${ASM_DIALECT}} PROGRAM PROGRAM_ARGS CMAKE_ASM${ASM_DIALECT}_FLAGS_ENV_INIT)
+    if(CMAKE_ASM${ASM_DIALECT}_FLAGS_ENV_INIT)
+      set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_FLAGS_ENV_INIT}" CACHE STRING "First argument to ASM${ASM_DIALECT} compiler")
+    endif()
+    if(NOT EXISTS ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
+      message(FATAL_ERROR "Could not find compiler set in environment variable ASM${ASM_DIALECT}:\n$ENV{ASM${ASM_DIALECT}}.")
+    endif()
   endif()
 
   # finally list compilers to try

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeDetermineASMCompiler.cmake |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list