Sync with trunk r65656.
[reactos.git] / cmake / CMakeDetermineASMCompiler.cmake
1
2 #=============================================================================
3 # Copyright 2007-2009 Kitware, Inc.
4 #
5 # Distributed under the OSI-approved BSD License (the "License");
6 # see accompanying file Copyright.txt for details.
7 #
8 # This software is distributed WITHOUT ANY WARRANTY; without even the
9 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # See the License for more information.
11 #=============================================================================
12 # (To distribute this file outside of CMake, substitute the full
13 # License text for the above reference.)
14
15 if(CMAKE_VERSION VERSION_LESS 2.8.10)
16
17 # determine the compiler to use for ASM programs
18
19 IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
20 # prefer the environment variable ASM
21 IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
22 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
23 ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
24
25 # finally list compilers to try
26 IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
27
28 IF(CMAKE_ASM_COMPILER_INIT)
29 SET(CMAKE_ASM_COMPILER_LIST ${CMAKE_ASM_COMPILER_INIT})
30 ELSE(CMAKE_ASM_COMPILER_INIT)
31
32 IF(CMAKE_C_COMPILER)
33 SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
34 SET(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
35 ELSEIF(CMAKE_CXX_COMPILER)
36 SET(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
37 SET(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
38 ELSE(CMAKE_CXX_COMPILER)
39 # List all default C and CXX compilers
40 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc
41 ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
42 ENDIF(CMAKE_C_COMPILER)
43
44 ENDIF(CMAKE_ASM_COMPILER_INIT)
45
46
47 ELSE("ASM${ASM_DIALECT}" STREQUAL "ASM") # some specific assembler "dialect"
48
49 IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
50 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
51 ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
52 MESSAGE(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
53 ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
54
55 ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
56
57
58 # Find the compiler.
59 IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
60 FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
61 ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
62 FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
63
64 ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
65
66 # we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
67 # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
68 #
69 # if a compiler was specified by the user but without path,
70 # now try to find it with the full path
71 # if it is found, force it into the cache,
72 # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
73 GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
74 IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
75 FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
76 MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
77 IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
78 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
79 ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
80 ENDIF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
81 ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
82 MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER)
83
84 IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
85 GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
86 ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
87
88
89 IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
90
91 # Table of per-vendor compiler id flags with expected output.
92 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
93 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
94 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
95
96 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
97 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
98 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
99
100 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
101 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
102 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
103
104 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
105 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
106 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
107
108 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
109 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
110 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
111
112 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
113 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
114 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
115
116 LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS VISUAL)
117 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_VISUAL "/?")
118 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_VISUAL "Microsoft Corporation")
119
120 INCLUDE(CMakeDetermineCompilerId)
121 CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
122
123 ENDIF()
124
125 IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
126 MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
127 ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
128 MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
129 ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
130
131
132
133 # If we have a gas/as cross compiler, they have usually some prefix, like
134 # e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas , optionally
135 # with a 3-component version number at the end
136 # The other tools of the toolchain usually have the same prefix
137 # NAME_WE cannot be used since then this test will fail for names lile
138 # "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
139 # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
140 IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
141 GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
142 IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
143 SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
144 ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
145 ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
146
147 # Now try the C compiler regexp:
148 IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
149 IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
150 SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
151 ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
152 ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
153
154 # Finally try the CXX compiler regexp:
155 IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
156 IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
157 SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
158 ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
159 ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
160
161
162 INCLUDE(CMakeFindBinUtils)
163
164 SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
165
166 IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
167 MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
168 ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
169 MESSAGE(STATUS "Didn't find assembler")
170 ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
171
172
173 SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
174 SET(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
175 SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
176 SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
177
178 # configure variables set in this file for fast reload later on
179 CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
180 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
181
182 SET(_CMAKE_ASM_COMPILER)
183 SET(_CMAKE_ASM_COMPILER_ARG1)
184 SET(_CMAKE_ASM_COMPILER_ENV_VAR)
185
186 else()
187
188 # determine the compiler to use for ASM programs
189
190 include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
191
192 if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
193 # prefer the environment variable ASM
194 if($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
195 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
196 endif()
197
198 # finally list compilers to try
199 if("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
200 if(NOT CMAKE_ASM_COMPILER_INIT)
201 if(CMAKE_C_COMPILER)
202 set(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
203 set(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
204 elseif(CMAKE_CXX_COMPILER)
205 set(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
206 set(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
207 else()
208 # List all default C and CXX compilers
209 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST
210 ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc
211 CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC)
212 endif()
213 endif()
214 else() # some specific assembler "dialect"
215 if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
216 message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
217 endif()
218 endif()
219
220 # Find the compiler.
221 _cmake_find_compiler(ASM${ASM_DIALECT})
222
223 else()
224
225 # we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
226 # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
227 #
228 # if a compiler was specified by the user but without path,
229 # now try to find it with the full path
230 # if it is found, force it into the cache,
231 # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
232 get_filename_component(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
233 if(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
234 find_program(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
235 mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
236 if(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
237 set(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
238 endif()
239 endif()
240 endif()
241 mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER)
242
243 if (NOT _CMAKE_TOOLCHAIN_LOCATION)
244 get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
245 endif ()
246
247
248 if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
249
250 # Table of per-vendor compiler id flags with expected output.
251 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
252 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
253 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
254
255 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
256 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
257 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
258
259 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
260 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
261 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
262
263 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
264 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
265 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
266
267 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
268 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
269 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
270
271 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
272 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
273 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft")
274
275 list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
276 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
277 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
278
279 include(CMakeDetermineCompilerId)
280 CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
281
282 endif()
283
284 if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
285 message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
286 else()
287 message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
288 endif()
289
290
291
292 # If we have a gas/as cross compiler, they have usually some prefix, like
293 # e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas , optionally
294 # with a 3-component version number at the end
295 # The other tools of the toolchain usually have the same prefix
296 # NAME_WE cannot be used since then this test will fail for names lile
297 # "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
298 # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
299 if (NOT _CMAKE_TOOLCHAIN_PREFIX)
300 get_filename_component(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
301 if (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
302 set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
303 endif ()
304 endif ()
305
306 # Now try the C compiler regexp:
307 if (NOT _CMAKE_TOOLCHAIN_PREFIX)
308 if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
309 set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
310 endif ()
311 endif ()
312
313 # Finally try the CXX compiler regexp:
314 if (NOT _CMAKE_TOOLCHAIN_PREFIX)
315 if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
316 set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
317 endif ()
318 endif ()
319
320
321 include(CMakeFindBinUtils)
322
323 set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
324
325 if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
326 message(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
327 else()
328 message(STATUS "Didn't find assembler")
329 endif()
330
331
332 set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
333 set(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
334 set(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
335 set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
336
337 # configure variables set in this file for fast reload later on
338 configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
339 ${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
340
341 set(_CMAKE_ASM_COMPILER)
342 set(_CMAKE_ASM_COMPILER_ARG1)
343 set(_CMAKE_ASM_COMPILER_ENV_VAR)
344
345 endif()
346