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

Set C standard to C11 #304

Merged
merged 2 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ if (NOT DEFINED Spglib_IS_TOP_LEVEL)
endif ()
endif ()

# Specify C standard. This can be overwritten using `-DCMAKE_C_STANDARD`
# https://discourse.cmake.org/t/cmake-lang-standard-and-fetchcontent-cache-variable-interaction/8348
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ int main(void) {
}
```

## Requirements

- C standard: As of version 2.1.0, Spglib explicitly enforces a minimum standard of
[C11](https://en.cppreference.com/w/c/11)

## How to use Spglib

We currently only officially support conda and pip packaging of spglib, with plans
Expand Down
5 changes: 5 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ The detailed algorithm of spglib is described the following text:
Atsushi Togo and Isao Tanaka,
<https://arxiv.org/abs/1808.01590> (written at version 1.10.4)

## Requirements

- C standard: As of version 2.1.0, Spglib explicitly enforces a minimum standard of
[C11](https://en.cppreference.com/w/c/11)

## Features

- Find symmetry operations
Expand Down