You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated CMakeLists.txt should contain a variable pointing to the LF src directory, e.g. LF_SRC_DIR. This can be used by any user-written CMake file to include files relative the main LF file. Currently the user must also use the files target property to have all the files they want copied into the src-gen directory. This is unnecessary duplicate work.
This should be an easy fix. Check out the CCmakeGenerator.java file.
The text was updated successfully, but these errors were encountered:
Great! I have argued for this before and never understood the files property in the C target. I think not even a variable like LF_SRC_DIR is required, as cmake already defines a bunch of sensible variables. For instance, CMAKE_CURRENT_LIST_DIR points to the directory in which the current cmake script is located. We use this in the C++ target to refer to external C++ files. See here for instance. Defining the variable LF_SRC_DIR in addition could be convenient, though.
In the C++ target, we also always add the src directory to the include paths so that we can resolve header files relative to the src directory and don't need to add them explicitly.
The generated CMakeLists.txt should contain a variable pointing to the LF src directory, e.g.
LF_SRC_DIR
. This can be used by any user-written CMake file to include files relative the main LF file. Currently the user must also use thefiles
target property to have all the files they want copied into thesrc-gen
directory. This is unnecessary duplicate work.This should be an easy fix. Check out the CCmakeGenerator.java file.
The text was updated successfully, but these errors were encountered: