-
Notifications
You must be signed in to change notification settings - Fork 519
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
There should be exportation of include directories in CMake file. #460
Comments
Can you describe what kind of problems arise because we don't have |
You are using include_directories. There are a bunch of problems with this. First of all, in my case, I am using dmlc-core as a subdirectory in my cmake project. So when you don't use Second, this is not the correct way in Modern CMake. As I told you, I am willing to send a patch to modernize your cmake implementation since I am going to use dmlc-core and halideir in one of my projects. For more information you can look at this links: |
Sure, ability to automatically locate dmlc-core headers sounds nice. You should submit a pull request so that me and other maintainers can review it. Some considerations:
|
About the first point, sure. I understand how painful it is to rewrite portions of your build tools. So I will keep it 100% compatible. About the second point, we all can agree CMake has become the defacto build system for C++ (particularly modern C++ libraries. Even boost is in process of migrating their build system to CMake). But the problem is CMake initial design had some serious flows. They are (have) working (worked) hard to improve it. So the old way in CMake was to use stuff like
In terms of adaptation, as far as I know (and see), most modern (and newly written) C++ library has adopted CMake (particularly Modern CMake) or they are in process of adopting it. For example, Boost developers have decided they are going to abandon their build system in favour of CMake. Facebook/folly has changed it build system to CMake and many others. |
I get your point about encapsulation. Also, the widespread adoption of CMake as build tool makes sense as well. My question would be: Do newly written C++ libraries tend to adopt Modern CMake conventions? Technical merits alone (encapsulation) are sufficient to consider the switch, but if we know other projects are adopting it as well the case for switching would be even stronger, since future contributors would find the practices conventional and idiomatic. Also, a bit of googling gave me the link https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/. Is this in line with what you had in mind for Modern CMake? |
|
Got it. I'll look forward to your pull request. |
@navidR I'd like to bring CMakeLists.txt up to modern standards and submit a pull request. Would you be willing to review it? |
Yes of course. Sadly I am so busy right now to write it myself (Although I am definitely going to write it if has not done till then). But I would definitely read & review it. |
Resolved by #495 |
After this line there should be a line along this line :
FYI this is a temporary fix. A better solution would be only using target_include_directories instead of include_directories. I am willing to send a small patch to fix CMake files if you are willing to accept patches.
The text was updated successfully, but these errors were encountered: