Unverified Commit a972850b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

require CMake version 3.10. remove tests for older versions.

parent 6354777d
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
# CMake build system
# This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)

project(lammps CXX)
set(SOVERSION 0)
@@ -355,9 +355,6 @@ endforeach(HEADER)
set(MATH_LIBRARIES "m" CACHE STRING "math library")
mark_as_advanced( MATH_LIBRARIES )
include(CheckLibraryExists)
if (CMAKE_VERSION VERSION_LESS "3.4")
  enable_language(C) # check_library_exists isn't supported without a C compiler before v3.4
endif()
# RB: disabled this check because it breaks with KOKKOS CUDA enabled
#foreach(FUNC sin cos)
#  check_library_exists(${MATH_LIBRARIES} ${FUNC} "" FOUND_${FUNC}_${MATH_LIBRARIES})
+0 −3
Original line number Diff line number Diff line
if(PKG_GPU)
    if (CMAKE_VERSION VERSION_LESS "3.1")
      message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
    endif()
    set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
    set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
                    ${GPU_SOURCES_DIR}/fix_gpu.h
+0 −3
Original line number Diff line number Diff line
@@ -8,9 +8,6 @@ if(PKG_LATTE)
  endif()
  option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
  if(DOWNLOAD_LATTE)
    if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
      message(FATAL_ERROR "For downlading LATTE you need at least cmake-3.7")
    endif()
    if(CMAKE_GENERATOR STREQUAL "Ninja")
      message(FATAL_ERROR "Cannot build downloaded LATTE library with Ninja build tool")
    endif()
+0 −3
Original line number Diff line number Diff line
@@ -8,9 +8,6 @@ if(PKG_MSCG)
  endif()
  option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
  if(DOWNLOAD_MSCG)
    if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
      message(FATAL_ERROR "For downlading MSCG you need at least cmake-3.7")
    endif()
    if(CMAKE_GENERATOR STREQUAL "Ninja")
      message(FATAL_ERROR "Cannot build downloaded MSCG library with Ninja build tool")
    endif()
+0 −4
Original line number Diff line number Diff line
if(PKG_USER-MOLFILE)
  if (CMAKE_VERSION VERSION_LESS "3.10") # due to INTERFACE without a library
    message(FATAL_ERROR "For configuring USER-MOLFILE you need CMake 3.10 or later")
  endif()

  set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
  add_library(molfile INTERFACE)
  target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})