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

Would it be possible to upgrade newer minimum required cmake version ? like 3.0 or 3.5 #407

Open
9prady9 opened this issue Nov 6, 2020 · 4 comments
Labels

Comments

@9prady9
Copy link
Contributor

9prady9 commented Nov 6, 2020

I am not sure if VERSION variables aren't set with older versions prior to 3.0, but they are definitely set with CMake versions above 3.0. It would be nice to use that feature to avoid the warnings in downstream projects when used via add_subdirectory approach.

Also, quite a few CMake variables don't have project name prefix causing name conflicts and/or confusion with downstream project's cache options when CLBlast is used via add_subdirectory command.

Should you guys be interested in the above, I can send in a PR soon with those changes.

Note: Ubuntu 16.04 uses cmake 3.5.1, although I believe CentOS 6 is still is at 2.8.12 - I am not 100% sure of centos 6.

@CNugteren
Copy link
Owner

About the second part, renaming some CMake variables, yes, I would be happy to accept such a PR.

About the first part, I'm not sure what you mean exactly, and therefore also don't know if it is worth bumping the minimum required CMake version. Do you have a link to some documentation or an example of this perhaps? Is it this you are talking about?

@9prady9
Copy link
Contributor Author

9prady9 commented Nov 7, 2020

About the second part, renaming some CMake variables, yes, I would be happy to accept such a PR.

Sure, will send soon.

Is it this you are talking about?

That and some new policies that are throwing warnings like the following I include CLBlast via add_subdirectory approach into a downstream project:

@CNugteren
Copy link
Owner

OK thanks for the details. Now that would then indeed change the version requirement. Since this all just happens at the start (right?) of the code, isn't it perhaps possible to do something along the lines of this:

cmake_minimum_required(VERSION 2.8.11)
if(${CMAKE_VERSION} VERSION_LESS "3.3.0")   # or whatever is the minimum required for these new features 
    project("clblast" C CXX)
else()
    project("clblast" C CXX VERSION 1.5.1)
endif()

That will make it a bit less readable but at least you can use the new feature for your purpose and others without a new version of CMake can still easily build CLBlast.

@9prady9
Copy link
Contributor Author

9prady9 commented Nov 7, 2020

Yes, something like that should work fine. Set policies are ignored I believe if they are not available in current version. So that should be also good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants