How to Defining the ASM assembler in the CMake script??

enable_language(C ASM)
include(“path/toolchain.cmake”)

The toolchain file needs to be provided before enabling a language; once enable_language is called, any compiler setting is baked in at that point because enabling the language involves testing the compiler to extract identity and version information. See the toolchain documentation.