Skip to content
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

Target-name and folder name #52

Closed
NOhs opened this issue Jun 4, 2018 · 3 comments
Closed

Target-name and folder name #52

NOhs opened this issue Jun 4, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@NOhs
Copy link
Collaborator

NOhs commented Jun 4, 2018

Did we already decide on whether we want to identify folders from target names? E.g.:

my_project
├── shared_headers
|   └── header1.hpp
├── my_executable
|   ├── include
|   |   ├── header1.hpp
|   |   └── header2.hpp
|   └── src
|       ├── src1.cpp
|       └── src2.hpp
├── my_lib
|   ├── include
|   |   └── header3.hpp
|   └── src
|       └── src3.hpp
└── clang-build.toml
[shared_headers] # Do we even need this?

[my_lib]
target_type = "shared library"
output_name  = "the_lib"

[my_executable]
dependencies = ["my_lib", "shared_headers"]
@GPMueller
Copy link
Contributor

What you wrote should work fine.
Note that subprojects may not work quite as well yet, as not every contingency has been tested, yet. See PR #47.

The shared_headers should currently be needed in the above example. I am not sure right now if this is only implemented on PR #47, but if we let clang-build search all folders of a project, things can become mixed. Therefore, top-level directories should only be searched, if no src or include folder is found for the corresponding target (or in this example, not even a target folder).

@GPMueller
Copy link
Contributor

Tested this and the folder name currently needs to be specified. This should of course be changed, as it is quite unnecessary.

@GPMueller GPMueller added the bug Something isn't working label Jun 30, 2018
@GPMueller
Copy link
Contributor

I cannot remember what my last comment was about... If it was about [shared_headers] # Do we even need this?, I don't believe that a named folder should be identified as a target by default. It would be better to specify all targets manually, so that repositories containing a lot of folders don't get mixed up.

I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants