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

Renaming myexe.link #17

Closed
NOhs opened this issue Mar 31, 2018 · 3 comments
Closed

Renaming myexe.link #17

NOhs opened this issue Mar 31, 2018 · 3 comments
Labels
discussion Something that might end up being labled enhancement or wontfix

Comments

@NOhs
Copy link
Collaborator

NOhs commented Mar 31, 2018

I think we should have a general dependency name for one target on another. An executable might depend on a library. But an executable might also depend on a header only target! The build-system should just know what to do:

dependence on header only library:

  • Add include files

dependence on library:

  • Add include files
  • Add linking

so how about

# Build a library
[mylib]
target_type = "sharedlibrary"
[mylib.sources]
include_directories = ["mylib/include"]
source_directories = ["mylib/src"]

[myheaderlib]
target_type = "headerlibrary"
[myheaderlib.sources]
include_directories = ["myheaderlib/include"]

# Build an executable and link the library
[myexe]
output_name = "runExe"
target_type = "executable"
dependencies = ["mylib", "myheaderlib"]
[myexe.sources]
include_directories = ["myexe/include"]
source_directories = ["myexe/src"]
[myexe.flags]
link = ["-DMYLIB_SOME_DEFINE"]
@NOhs NOhs added the discussion Something that might end up being labled enhancement or wontfix label Mar 31, 2018
@GPMueller
Copy link
Contributor

Agreed, the <targetname>.link section is not needed.

@NOhs
Copy link
Collaborator Author

NOhs commented Apr 1, 2018

Ok, I removed it in my current branch.

@NOhs
Copy link
Collaborator Author

NOhs commented Apr 19, 2018

Solved by #23

@NOhs NOhs closed this as completed Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Something that might end up being labled enhancement or wontfix
Projects
None yet
Development

No branches or pull requests

2 participants