I'm struggling with integrating JWAsm together with CMake. I've found an old thread from 2009 which uses CMakeTestASMCompiler to change the assembler. It defines:
1.) CMakeDetermineASM_JWASMCompiler.cmake
SET(ASM_DIALECT "_JWASM")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
IF(CMAKE_HOST_WIN32)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT
"<CMAKE_ASM${ASM_DIALECT}_COMPILER> -nologo -coff <FLAGS> -Fo<OBJECT>
<SOURCE>")
ELSE(CMAKE_HOST_WIN32)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT
"<CMAKE_ASM${ASM_DIALECT}_COMPILER> -nologo -elf <FLAGS> -Fo<OBJECT>
<SOURCE>")
ENDIF(CMAKE_HOST_WIN32)
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)
2.) CMakeDetermineASM_JWASMCompiler.cmake
SET(ASM_DIALECT "_JWASM")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT jwasm)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)
And it uses like that:
set(CMAKE_ASM_JWASM_COMPILER "/usr/sbin/jwasm")
set(ASM_DIALECT "_JWASM")
include(CMakeTestASMCompiler)
set(ASM_DIALECT)
enable_language(ASM_JWASM)
My issue: CMake fails locating 1.) and 2.) with the following error message:
CMake Error: Could not find cmake module file: CMakeDetermineASM_JWASMCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_ASM_JWASM_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: [...]/build/[..]/CMakeFiles/3.13.4/CMakeASM_JWASMCompiler.cmake
CMake Error: Could not find cmake module file: CMakeASM_JWASMInformation.cmake
CMake Error: Could not find cmake module file: CMakeTestASM_JWASMCompiler.cmake
Any idea where/how should those .cmake files be installed? Thanks,