build(cmake): add source preprocessing helper
CMake offers no way to preprocess files, which means that we have to do
this ourself through an amalgamation of manual compiler-specific logic.
This commit adds a single function to preprocess an arbitrary file using
the preprocessor for a given language (assembler, C, or C++) and output
the result to another file. This preprocessing is done at build-time,
and the resulting file can be used as a dependency for other targets.
Change-Id: Ia80e3336f3647acfeba002dda4bc0b2428d1c2a6
Signed-off-by: Chris Kay <chris.kay@arm.com>
diff --git a/docs/cmake/manual/module/external/ArmPreprocessSource.rst b/docs/cmake/manual/module/external/ArmPreprocessSource.rst
new file mode 100644
index 0000000..c95c2ba
--- /dev/null
+++ b/docs/cmake/manual/module/external/ArmPreprocessSource.rst
@@ -0,0 +1,5 @@
+.. cmake-module:: ../../../../../cmake/Modules/ArmPreprocessSource.cmake
+
+--------------
+
+*Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.*