Skip to content

Commit

Permalink
CMake : add C99 standard, move to CMake3 (#298)
Browse files Browse the repository at this point in the history
* update CMakeLists.txt:
- add C99 standard checking to `CMakeLists.txt`
  older compilers may not enable this by default.
- change minimum cmake version to 3.0
  cmake2 does not recognize `add_library(... INTERFACE ...)`

* update CHANGES
  • Loading branch information
RyanBernX authored Mar 28, 2021
1 parent 47fc83c commit 51b299c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
arpack-ng - 3.9.0

[ Haoyang Liu ]
* CMake: minimum required version changed to 3.0
* CMake: add C99 standard checking

[ Robert Schütz ]
* use CMAKE_INSTALL_FULL_<dir> in arpack.pc

Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.6)
cmake_minimum_required(VERSION 3.0)

if (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
Expand All @@ -13,6 +13,10 @@ set(arpack_ng_VERSION ${arpack_ng_MAJOR_VERSION}.${arpack_ng_MINOR_VERSION}.${ar

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)

# set C99 standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)

# Adopted from https://github.com/feymark/arpack.git

if (POLICY CMP0042)
Expand Down

0 comments on commit 51b299c

Please sign in to comment.