require CMake version 3.16

This commit is contained in:
Axel Kohlmeyer
2023-06-30 22:59:41 -04:00
parent c5d9f901d9
commit 378ef4b23e
24 changed files with 45 additions and 33 deletions

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.10) # -*- CMake -*- configuration for file for building libjpeg-turbo
cmake_minimum_required(VERSION 3.16)
# When using CMake 3.4 and later, don't export symbols from executables unless # When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set. # the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065) if(POLICY CMP0065)
@ -612,4 +613,4 @@ else()
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}") set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c) set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c) set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif() endif()

View File

@ -1,4 +1,4 @@
# CMakeLists.txt # -*- CMake -*- configuration for file for building libpng
# Copyright (C) 2018 Cosmin Truta # Copyright (C) 2018 Cosmin Truta
# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson # Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
@ -18,7 +18,7 @@
# For conditions of distribution and use, see the disclaimer # For conditions of distribution and use, see the disclaimer
# and license in png.h # and license in png.h
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
cmake_policy(VERSION 3.1) cmake_policy(VERSION 3.1)
# When using CMake 3.4 and later, don't export symbols from executables unless # When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set. # the CMAKE_ENABLE_EXPORTS variable is set.

View File

@ -1,8 +1,9 @@
# -*- CMake -*- master configuration file for building LAMMPS
######################################## ########################################
# CMake build system # CMake build system
# This file is part of LAMMPS # This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger # Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
######################################## ########################################
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it # set policy to silence warnings about ignoring <PackageName>_ROOT but use it
if(POLICY CMP0074) if(POLICY CMP0074)

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.10) # -*- CMake -*- configuration for file for building libz
cmake_minimum_required(VERSION 3.16)
# When using CMake 3.4 and later, don't export symbols from executables unless # When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set. # the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065) if(POLICY CMP0065)
@ -192,4 +193,4 @@ add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZL
if(UNIX) if(UNIX)
# On unix-like platforms the library is almost always called libz # On unix-like platforms the library is almost always called libz
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z) set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
endif() endif()

View File

@ -1,9 +1,8 @@
########################################## # -*- CMake -*- file for example programs that use the LAMMPS library
# CMake build system for coupling to the LAMMPS library
# where the library is loaded dynamically at runtime. # where the library is loaded dynamically at runtime.
########################################## ##########################################
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
# enforce out-of-source build # enforce out-of-source build
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})

View File

@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.10) # -*- CMake -*- file for simple examples using the LAMMPS library interface
cmake_minimum_required(VERSION 3.16)
# enforce out-of-source build # enforce out-of-source build
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})

View File

@ -1,10 +1,9 @@
########################################## # -*- CMake -*- build system for plugin examples.
# CMake build system for plugin examples.
# The is meant to be used as a template for plugins that are # The is meant to be used as a template for plugins that are
# distributed independent from the LAMMPS package. # distributed independent from the LAMMPS package.
########################################## ##########################################
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
project(paceplugin VERSION 1.0 LANGUAGES CXX) project(paceplugin VERSION 1.0 LANGUAGES CXX)

View File

@ -1,5 +1,4 @@
########################################## # -*- CMake -*- file for building plugins.
# CMake build system for plugin examples.
# The is meant to be used as a template for plugins that are # The is meant to be used as a template for plugins that are
# distributed independent from the LAMMPS package. # distributed independent from the LAMMPS package.
########################################## ##########################################

View File

@ -1,10 +1,9 @@
########################################## # -*- CMake -*- file for plugin examples.
# CMake build system for plugin examples.
# The is meant to be used as a template for plugins that are # The is meant to be used as a template for plugins that are
# distributed independent from the LAMMPS package. # distributed independent from the LAMMPS package.
########################################## ##########################################
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
# enforce out-of-source build # enforce out-of-source build
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.10) # -*- CMake -*- file for building spglib for phana
cmake_minimum_required(VERSION 3.16)
project(spglib C) project(spglib C)
set(CMAKE_MACOSX_RPATH 1) set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2") set(CMAKE_C_FLAGS_RELEASE "-Wall -O2")
@ -10,7 +11,6 @@ message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Version numbers # Version numbers
file(READ ${PROJECT_SOURCE_DIR}/src/version.h version_file) file(READ ${PROJECT_SOURCE_DIR}/src/version.h version_file)
string(REGEX MATCH "SPGLIB_MAJOR_VERSION ([0-9]+)" spglib_major_version ${version_file}) string(REGEX MATCH "SPGLIB_MAJOR_VERSION ([0-9]+)" spglib_major_version ${version_file})

View File

@ -1,7 +1,8 @@
# -*- CMake -*- configuration for building the PHONON package analysis tool: phana
# Support Linux from Ubuntu 20.04LTS onward, CentOS 7.x (with EPEL), # Support Linux from Ubuntu 20.04LTS onward, CentOS 7.x (with EPEL),
# macOS, MSVC 2019 (=Version 16) # macOS, MSVC 2019 (=Version 16)
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
# set timestamp of downloaded files to that of archive # set timestamp of downloaded files to that of archive
if(POLICY CMP0135) if(POLICY CMP0135)

View File

@ -1,7 +1,8 @@
# -*- CMake -*- configuration for building the tricubic library
# Support Linux from Ubuntu 20.04LTS onward, CentOS 7.x (with EPEL), # Support Linux from Ubuntu 20.04LTS onward, CentOS 7.x (with EPEL),
# macOS, MSVC 2019 (=Version 16) # macOS, MSVC 2019 (=Version 16)
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
# set up project # set up project
project(tricubic VERSION 1.1 DESCRIPTION "Tricubic library" LANGUAGES CXX) project(tricubic VERSION 1.1 DESCRIPTION "Tricubic library" LANGUAGES CXX)

View File

@ -1,7 +1,7 @@
# CMake configuration for generating script language interfaces with SWIG # -*- CMake -*- configuration for generating LAMMPS script language wrappers with SWIG
# set minimum CMake version required and switch to new policies for SWIG # set minimum CMake version required and switch to new policies for SWIG
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0078) if(POLICY CMP0078)
cmake_policy(SET CMP0078 NEW) cmake_policy(SET CMP0078 NEW)
endif() endif()

View File

@ -1,10 +1,9 @@
######################################## # -*- CMake -*- build file for automated testing
# CMake build for automated testing
# This file is part of LAMMPS # This file is part of LAMMPS
# Created by Axel Kohlmeyer and Richard Berger # Created by Axel Kohlmeyer and Richard Berger
######################################## ########################################
# download and build googletest framework
# download and build googletest framework
# cannot compile googletest anymore with the default GCC on RHEL 7.x # cannot compile googletest anymore with the default GCC on RHEL 7.x
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)) if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0))
message(FATAL_ERROR "Need GNU C++ compiler version 6.x or later for unit testing") message(FATAL_ERROR "Need GNU C++ compiler version 6.x or later for unit testing")

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for testing the c-library interface
add_executable(test_library_open test_library_open.cpp test_main.cpp) add_executable(test_library_open test_library_open.cpp test_main.cpp)
target_link_libraries(test_library_open PRIVATE lammps GTest::GMock) target_link_libraries(test_library_open PRIVATE lammps GTest::GMock)

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for testing LAMMPS commands
add_executable(test_simple_commands test_simple_commands.cpp) add_executable(test_simple_commands test_simple_commands.cpp)

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for testing the direct calls to individual C++ classes
add_executable(test_lammps_class test_lammps_class.cpp) add_executable(test_lammps_class test_lammps_class.cpp)
target_link_libraries(test_lammps_class PRIVATE lammps GTest::GMockMain) target_link_libraries(test_lammps_class PRIVATE lammps GTest::GMockMain)

View File

@ -1,6 +1,6 @@
# Custom minimal -*- CMake -*- file for libyaml # Custom minimal -*- CMake -*- file for libyaml
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.16)
project(libyaml VERSION 0.2.5 project(libyaml VERSION 0.2.5
DESCRIPTION "LibYAML a YAML parser and emitter library" DESCRIPTION "LibYAML a YAML parser and emitter library"
LANGUAGES C LANGUAGES C

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for tests of classes computing or modifying forces
find_package(YAML) find_package(YAML)
if(NOT YAML_FOUND) if(NOT YAML_FOUND)

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for tests of file reading or writing classes and functions in LAMMPS
add_executable(test_atom_styles test_atom_styles.cpp) add_executable(test_atom_styles test_atom_styles.cpp)
target_link_libraries(test_atom_styles PRIVATE lammps GTest::GMock) target_link_libraries(test_atom_styles PRIVATE lammps GTest::GMock)

View File

@ -1,3 +1,5 @@
# -*- CMake -*- file for testing the Fortran interface to LAMMPS
include(CheckGeneratorSupport) include(CheckGeneratorSupport)
if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN) if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN)
message(STATUS "Skipping Tests for the LAMMPS Fortran Module: no Fortran support in build tool") message(STATUS "Skipping Tests for the LAMMPS Fortran Module: no Fortran support in build tool")

View File

@ -1,7 +1,8 @@
# Test calling Python from LAMMPS (and importing the LAMMPS module # -*- CMake -*- file for tests calling Python from LAMMPS (and importing
# inside those functions). This can do an "anonymous" import of symbols # the LAMMPS module inside those functions). This can do an "anonymous"
# from the executable, so the shared library is not needed. The # import of symbols from the executable, so the shared library is not
# availability of the PYTHON package is tested for inside the tester. # needed. The availability of the PYTHON package is tested for inside
# the tester.
set(TEST_INPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}) set(TEST_INPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for tests of utily functions and classes in LAMMPS
# we use python 3's subprocess module to run the tools and check the output # we use python 3's subprocess module to run the tools and check the output
if(CMAKE_VERSION VERSION_LESS 3.12) if(CMAKE_VERSION VERSION_LESS 3.12)

View File

@ -1,3 +1,4 @@
# -*- CMake -*- file for tests of utily functions and classes in LAMMPS
add_executable(test_tokenizer test_tokenizer.cpp) add_executable(test_tokenizer test_tokenizer.cpp)
target_link_libraries(test_tokenizer PRIVATE lammps GTest::GMockMain) target_link_libraries(test_tokenizer PRIVATE lammps GTest::GMockMain)