1

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?

bdas
  • 21
  • 3

1 Answers1

0

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.

Alex Reinking
  • 16,724
  • 5
  • 52
  • 86
  • Yeah, I just replaced the -VV with a -D and a path to the file. This fixed the problem and I successfully installed Trilinos onto Stampede2. Thanks for the tip! – bdas May 05 '21 at 20:21
  • Since it seems this solved your problem, consider upvoting and/or accepting my answer. – Alex Reinking May 05 '21 at 20:51
  • Unfortunately, I don't have enough reputation to upvote your answer :( . I would if I could. – bdas May 06 '21 at 21:03