Skip to content

Commit

Permalink
Change cmake_minimum_required() from 3.17.1 to 3.0 (TriBITSPub/TriBIT…
Browse files Browse the repository at this point in the history
…S#522)

This is to simulate external projects that call find_package(Trilinos) that
may require an older version of CMake than that is required by
Trilinos/TriBITS.

NOTE: This exposes the error:

---------------------------------------------

CMake Warning (dev) at /ascldap/users/rabartl/Trilinos.base/BUILDS/PR/clang-10.0.0/install/lib/cmake/Kokkos/KokkosConfig.cmake:197 (IF):
  Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
  --help-policy CMP0057" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  IN_LIST will be interpreted as an operator when the policy is set to NEW.
  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /ascldap/users/rabartl/Trilinos.base/BUILDS/PR/clang-10.0.0/install/lib/cmake/Trilinos/TrilinosConfig.cmake:114 (include)
  CMakeLists.txt:8 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /ascldap/users/rabartl/Trilinos.base/BUILDS/PR/clang-10.0.0/install/lib/cmake/Kokkos/KokkosConfig.cmake:197 (IF):
  if given arguments:

    "Kokkos_ENABLE_THREADS" "AND" "NOT" "DEPRECATED_CODE_3" "IN_LIST" "Kokkos_OPTIONS"

  Unknown arguments specified
Call Stack (most recent call first):
  /ascldap/users/rabartl/Trilinos.base/BUILDS/PR/clang-10.0.0/install/lib/cmake/Trilinos/TrilinosConfig.cmake:114 (include)
  CMakeLists.txt:8 (find_package)

-- Configuring incomplete, errors occurred!

---------------------------------------------

reported in #10456 and TRILINOSHD-128

In a later commit, we will update the version of TriBITS that addresses this.
  • Loading branch information
bartlettroscoe committed Aug 24, 2022
1 parent 3663abb commit d03c584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demos/simpleBuildAgainstTrilinos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CMAKE File for "MyApp" application building against an installed Trilinos

cmake_minimum_required(VERSION 3.17.1)
cmake_minimum_required(VERSION 3.0)

# Declare project but don't process compilers yet
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
cmake_minimum_required(VERSION 3.17)
cmake_minimum_required(VERSION 3.0)

# Disable Kokkos warning about not supporting C++ extensions
set(CMAKE_CXX_EXTENSIONS OFF)

project(find_package_Trilinos NONE)

Expand Down

0 comments on commit d03c584

Please sign in to comment.