Can I create a global variable to use for future projects?

To: Kyle Edwards, Petr Kmoch, and others
Re: Scope of Global Variables

When the CMake Generator (cmake -G “Eclipse CDT4 - Unix Makefiles”) process the following command found in CMakeLists.txt:

include_directories($(MACRO_UTILS_INC_FOLDER))

a generated readme.md file states the following:

"The project will export a global variable MACRO_UTILS_INC_FOLDER that points to the folder needed to be included so that `#include "azure_macro_utils/macro_utils.h"` resolves properly."

but any such “global variable” disappears once CMake execution has finished.

so, with nothing in the Generated makefile to “include directories”, how can the generated “makefile” ever work? And it does not work.

This looks like a big Generator Error to me, unless somebody has a solution.

Thanks,
Garry Anderson.
2020-06-11