CMake Generator Error when Creating Unix Makefiles
To CMake Generator Team:
The CMake Generator for Unix Makefiles (cmake -G "Eclipse CDT4 - Unix Makefiles") does not work completely. The resulting "makefile" should work with a "make" command, but because of an oversight in the Generator operation and/or design, the folder-paths to some header files were not generated into the "makefile". Thus, the Generated makefile will never work because of missing header files.
What am I missing here?
When running the CMake Generator, the source build file (CMakeLists.txt) has the following CMake commands to be converted into equivalent makefile commands:
line 259 include_directories(${MACRO_UTILS_INC_FOLDER})
line 260 include_directories(${UMOCK_C_INC_FOLDER})
The Generated Unix Makefile does not have anything generated that is equivalent to the above two lines. Thus, there is no way that the makefile will ever work if these INC_FOLDERS are missing.
The Generated readme.md file contains the following text statement, with a hint:
"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."
The problem with the above statement is that the "exported global variables" in the CMake process have a scope that persists during the CMake execution, but that scope disappears after CMake terminates. So, when it comes time to use the generated "makefile" at a later time, these "global variables" are not available. This is such a major error with the CMake Generator, I find it hard to believe that I am the first one to find this Generator Error.
So, who is in charge, and what is the solution?
How about somebody responsible for the Generator look into this Error and provide a solution that actually works?
The attached files are what is involvedInclude_Archive.zip
Thank you for any suggestions you may offer, Garry Anderson @ shaw [dot] ca 2020-06-12