CMake Error: Unknown argument -VV when installing Trilinos

830 views Asked by At

I am using the following code :

#!/usr/bin/env bash

module load cmake python boost phdf5 netcdf
export F77='which mpif90 || /bin/true'
export COPTFLAGS="-O1"
export CC='which mpicc || /bin/true'
export CXX='which mpicxx || /bin/true'

export INSTALL_LOCATION=$HOME'/projects/trilinos/'

cmake -VV \
  -D BUILD_SHARED_LIBS:BOOL=ON \
  -D Trilinos_VERBOSE_CONFIGURE=OFF \
  -D CMAKE_VERBOSE_MAKEFILE=ON \
  -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
  -D Trilinos_ENABLE_TESTS:BOOL=OFF \
  -D Trilinos_ENABLE_EXAMPLES:BOOL=OFF \
  \
  -D CMAKE_INSTALL_PREFIX:PATH=${INSTALL_LOCATION} \
  -D CMAKE_BUILD_TYPE:STRING=RELEASE \
  -D CMAKE_C_FLAGS:STRING="${COPTFLAGS} -mkl" \
  -D CMAKE_CXX_FLAGS:STRING="${COPTFLAGS} -mkl -DMPICH_SKIP_MPICXX" \
  \
  -D BLAS_INCLUDE_DIRS:PATH="${TACC_MKL_INC}" \
  -D BLAS_LIBRARY_DIRS:PATH="${TACC_MKL_LIB}" \
  -D 

and I get the following error: CMake Error: Unknown argument -VV

I am using CMake version 3.20.2.

Any thoughts?

1

There are 1 answers

3
Alex Reinking On

As of CMake 3.20, invalid command line arguments now result in an error where they were previously ignored. The release notes read:

When running cmake(1) to Generate a Project Buildsystem, unknown command-line arguments starting with a hyphen (-) are now rejected with an error. Previously they were silently ignored.

There has never been a capital -V or -VV option to CMake. See the docs: https://cmake.org/cmake/help/latest/manual/cmake.1.html

Naturally, the solution to your immediate problem is to remove that flag since it never did anything in the first place, anyway.