-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List header files as target dependencies #13
Comments
Should be solved with appropriate usage of |
And an example of how it is used: https://github.com/arrayfire/arrayfire/blob/devel/src/backend/opencl/CMakeLists.txt |
That's another thing. Yes, it's nice to define source groups, but adding a file to a source group does not add it automatically also to the list of files of a build target. You still have to add the header files to the list of source files that a target depends on. Another reason for doing this is that the target otherwise will not be rebuild when the header file is modified. When you look at the example you posted, you will see that they pass both lists of header files and source files to the |
BTW I am not sure how valuable source groups are actually in this scenario because source files are already grouped by modules (i.e., separate libraries). Visual Studio, for example, will then have a list of Common module source files in "includes" and "sources" (or so) folders of the Common library target. The same for other modules. Not sure how it is for Xcode or whether |
While header files are not required to be in the list of source files of a library or executable target because these are no actual compilation units, CMake IDE generators will not link them in the project files such as Xcode or Visual Studio. Weakly related issue: #4.
The text was updated successfully, but these errors were encountered: