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

cpp_cc_git_submodule helper requires newer version of CMake than documented #100

Open
olupton opened this issue Apr 9, 2021 · 6 comments

Comments

@olupton
Copy link
Contributor

olupton commented Apr 9, 2021

The BUILD and PACKAGE keyword arguments to cpp_cc_git_submodule are supposed to work as flags even when they are not passed values. i.e.

cpp_cc_git_submodule(foo)
cpp_cc_git_submodule(foo BUILD)
cpp_cc_git_submodule(foo BUILD bar)

are all supposed to do different things. This relies on the <prefix>_KEYWORDS_MISSING_VALUES output of cmake_parse_arguments, which was only added in CMake v3.15. Without this feature IIUC we cannot distinguish between the first two cases. The coding conventions' README states the minimum version is v3.10.

Either we should explicitly state that v3.15 is required, or cpp_cc_git_submodule should be modified for compatibility with older versions.

@olupton
Copy link
Contributor Author

olupton commented Apr 12, 2021

cc: @alkino @tristan0x

@alkino
Copy link
Member

alkino commented Apr 12, 2021

ubuntu 18.04 (LTS) install cmake 3.10.2. nmodl still needs cmake >= 3.8, coreneuron cmake >= 3.7.

@tristan0x
Copy link
Member

Thank you for noticing this @olupton
cpp_cc_git_submodule CMake function should indeed be modified to work as expected with CMake 3.10.2 or higher.

@tristan0x
Copy link
Member

ubuntu 18.04 (LTS) install cmake 3.10.2. nmodl still needs cmake >= 3.8, coreneuron cmake >= 3.7.

Are these CMake versions supported for a reason or could they be bumped to CMake 3.10.2?
Maybe @pramodk can answer this.

@olupton
Copy link
Contributor Author

olupton commented Apr 12, 2021

OK, if the minimum version is going to remain 3.10.2 then I fear we need to change the API to something like

cpp_cc_git_submodule(foo BUILD BUILD_ARGUMENTS bar)

for the third case above. Do you know if/were this is actually used?

@tristan0x
Copy link
Member

OK, if the minimum version is going to remain 3.10.2 then I fear we need to change the API to something like

cpp_cc_git_submodule(foo BUILD BUILD_ARGUMENTS bar)

for the third case above. Do you know if/were this is actually used?

I thought it was used at least in CoreNeuron, but apparently not. API can be changed at will!

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

No branches or pull requests

3 participants