How do CMake placeholders work?

Viewed 606

Inside the support libraries for CMake, you'll see command definitions that look like this:

 set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")

(from /usr/share/cmake-3.5/Modules/CMakeASMInformation.cmake in my install for example)

The objects of interest here to me are the placeholders (phrase obtained here): <DEFINES> <INCLUDES> <FLAGS>; I'm trying to figure out how they interact with the rest of CMake.

Given that I was able to pass flags to my assembler by setting CMAKE_ASM-ATT_FLAGS, I had sort of thought that there might be some magic mapping a placeholder to a variable name... but setting CMAKE_ASM-ATT_INCLUDES didn't seem to do anything.

So how would <INCLUDES> be populated here? Can it be filled in a target-specific manner?

1 Answers
Related