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

Doesn't configure with cmake 3.5 #4

Closed
VorpalBlade opened this issue Nov 10, 2018 · 4 comments
Closed

Doesn't configure with cmake 3.5 #4

VorpalBlade opened this issue Nov 10, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@VorpalBlade
Copy link

$ cmake ..
CMake Error at CMakeLists.txt:3 (project):
  project with VERSION must use LANGUAGES before language names.


-- Configuring incomplete, errors occurred!
$ cmake --version
cmake version 3.5.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

It looks like cmake 3.5.1 does not support the "DESCRIPTION" attribute to project():

$ cmake --help-command project
[...]
 project(<PROJECT-NAME> [LANGUAGES] [<language-name>...])
 project(<PROJECT-NAME>
         [VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
         [LANGUAGES <language-name>...])

[...]

I see two solutions: either change cmake_minimum_required (which will mean more work for me, since I will have to build a separate cmake) or change the file to be compatible with the currently specified minimum cmake version.

I tried adding "LANGUAGES C" in the middle as well as the end of that list, but that doesn't work, getting errors such as "Could not find cmake module file: CMakeDetermineDESCRIPTIONCompiler.cmake".

Removing the description does work however, I'm not sure if it can be added in some other way instead perhaps. It might be possible to do an if statement on cmake version and do two different project clauses as well.

@FedeDP
Copy link
Owner

FedeDP commented Nov 10, 2018

What about using:
project(module VERSION 3.0.1 LANGUAGES C)
?

@VorpalBlade
Copy link
Author

Yes that works. But adding DESCRIPTION to at any point makes it fail.

@FedeDP
Copy link
Owner

FedeDP commented Nov 10, 2018

I think is okay to avoid adding DESCRIPTION for me. I will push updated CMakeLists.

@FedeDP
Copy link
Owner

FedeDP commented Nov 10, 2018

Fixed in e4b92f7.

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