summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-05 14:23:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-05 14:23:14 (GMT)
commit8ababa140c13c8a38ac46b2d5feb089b0b3ee25d (patch)
tree863ee936343fe238f64eef4aa998426849936f4d
parenta0adef2bed84b77e81856d75399c913fbc6789dc (diff)
parentdd153de4f0c737f75b545b503b330880001135fe (diff)
downloadCMake-8ababa140c13c8a38ac46b2d5feb089b0b3ee25d.zip
CMake-8ababa140c13c8a38ac46b2d5feb089b0b3ee25d.tar.gz
CMake-8ababa140c13c8a38ac46b2d5feb089b0b3ee25d.tar.bz2
Merge topic 'asm-splitting'
dd153de4 CMakeDetermineASMCompiler: arg-split ASM* env var like CC
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake8
1 files changed, 7 insertions, 1 deletions
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