On Friday 06 February 2009, Dmitry Bely wrote: > On Tue, Feb 3, 2009 at 11:22 PM, Alexander Neundorf > > <[email protected]> wrote: > > On Tuesday 03 February 2009, Hendrik Sattler wrote: > >> Dmitry Bely schrieb: > >> >> If you use a toolchain file because you are cross-compiling, then you > >> >> do not have this problem. > >> > > >> > I would like to use the same CMakeLists.txt for native Win32 and > >> > cross-compiled Linux build. How to select the desired assembler then? > >> > >> Just like you select the C compiler in your toolchain file: > >> set ( CMAKE_ASM_MASM_COMPILER /path/to/masm/or/jwasm ) > > > > Or set the ASM_MASM environment variable to the assembler you want to use > > before calling cmake (the same way as you can set CC or CXX before > > running cmake). > > It's not enough: jwasm requires different options. Also redefine > CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT?
Yes. If you have a look at CMake/Modules/CMakeASMInformation.cmake, you see that several optional more specific files can be used. E.g. you could write a jwasm.cmake file, set the ..._COMPILE_OBJECT rule there and put it into CMake/Modules/Platform/, and it will be loaded automatically when jwasm is found. If you need special settings e.g. for Windows, cygwin or Linux, you can also create a e.g. Windows-jwasm.cmake file and put the necessary information there. > Not very convenient... It's not much work and it has to be done only once. We would be happy about a patch which makes cmake work with jwasm. Alex _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
