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

Building with CMake 3.16.3 fails due to invalid C_STANDARD value 17 #2850

Closed
Joeyrp opened this issue Jan 30, 2025 · 2 comments
Closed

Building with CMake 3.16.3 fails due to invalid C_STANDARD value 17 #2850

Joeyrp opened this issue Jan 30, 2025 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Joeyrp
Copy link

Joeyrp commented Jan 30, 2025

In CMakeLists.txt cmake_minimum_required is currently set to 3.14.0 and (on line 69) C_STANDARD is set to 17. But it appears that setting C_STANDARD to 17 is not supported in CMake until version 3.21 (see here: https://cmake.org/cmake/help/v3.21/prop_tgt/C_STANDARD.html).

The CONTRIBUTING.md mentions that notcurses is targeting c11 though so I'm not sure if you want to adjust the minimum CMake version required or change the C_STANDARD value. I was able to build successfully after changing C_STANDARD to 11.

Environment Info [not sure much of this is relevant but just in case]:

  • LANG: C.UTF-8
    LC_CTYPE:
    TERM: xterm-256color
  • notcurses version: 3.0.13 (from the CMakeLists.txt file). I'm trying to build the current master branch which is on this commit: 333455e
  • fish 3.7.1 and bash 5.0.17
  • Building on Ubuntu 20.04 in WSL 2
  • CMake version 3.16.3
  • gcc version 9.4.0
@Joeyrp Joeyrp added the bug Something isn't working label Jan 30, 2025
@dankamongmen dankamongmen self-assigned this Jan 30, 2025
@dankamongmen dankamongmen added this to the 3.1.0 milestone Jan 30, 2025
@dankamongmen
Copy link
Owner

thanks much for the heads up! i think depping on 3.21 is reasonable, unless anyone feels otherwise. let me update the docs and cmake stuff.

@dankamongmen
Copy link
Owner

that ought get it. hack on!

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