summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-02 14:43:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-02 14:43:14 (GMT)
commit14cdf5971e8d25a7f7dfe3163de8d46e8ec8ea22 (patch)
tree46e1238410f88c99f0ac0c36e3240168286cc204 /Modules
parentbfc81c5934e6cc0ade50e6ed461e211d55757765 (diff)
parent487f147fa9422e654c86c467c80d7620a65b6c45 (diff)
downloadCMake-14cdf5971e8d25a7f7dfe3163de8d46e8ec8ea22.zip
CMake-14cdf5971e8d25a7f7dfe3163de8d46e8ec8ea22.tar.gz
CMake-14cdf5971e8d25a7f7dfe3163de8d46e8ec8ea22.tar.bz2
Merge topic 'asm-user-override-files'
487f147f Load CMAKE_USER_MAKE_RULES_OVERRIDE[_ASM] for assembler (#15108)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeASMInformation.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index dce1624..62ef972 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)