summaryrefslogtreecommitdiff
path: root/Modules/CMakeASMInformation.cmake
diff options
context:
space:
mode:
authorMikhail Nikonov <michael.nikonov@mail.ru>2014-08-26 04:44:16 +0400
committerBrad King <brad.king@kitware.com>2014-08-27 09:27:36 -0400
commit487f147fa9422e654c86c467c80d7620a65b6c45 (patch)
tree9fe47da3231024c1769147dfab4c93f94d58f1cf /Modules/CMakeASMInformation.cmake
parentc2a47a9ac3fef38d9da6260725708c2246c1b9c1 (diff)
downloadcmake-487f147fa9422e654c86c467c80d7620a65b6c45.tar.gz
Load CMAKE_USER_MAKE_RULES_OVERRIDE[_ASM] for assembler (#15108)
This is already done for C, CXX, and Fortran.
Diffstat (limited to 'Modules/CMakeASMInformation.cmake')
-rw-r--r--Modules/CMakeASMInformation.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index dce162496b..62ef972a3a 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -50,6 +50,24 @@ if(NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
endif()
+# This should be included before the _INIT variables are
+# used to initialize the cache. Since the rule variables
+# have if blocks on them, users can still define them here.
+# But, it should still be after the platform file so changes can
+# be made to those values.
+
+if(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ # Save the full path of the file so try_compile can use it.
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif()
+
+if(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM)
+ # Save the full path of the file so try_compile can use it.
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_ASM} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM "${_override}")
+endif()
+
# Set default assembler file extensions:
if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)