<div dir="ltr"><div>Hi,</div><div><br></div><div>I would like to ask a question about FindPETSc.cmake. I place the cmake file in the same directory where main.cpp is placed. I also placed the file in /usr/share/cmake_xx/Modules. Where should i put the file? What else should I do to use the file in cmake? Do I need any other lines in my cmakelists.txt except find_package(petsc)? Thanks for your comments.</div><div><br></div><div>Evan</div><div><br></div><div>-------------------------------------------------------------</div><div><br></div><div><div>cmake_minimum_required(VERSION 3.10)</div><div><br></div><div>project(hellopetsc)</div><div><br></div><div>SET(CMAKE_CXX_STANDARD 11)</div><div>SET(CMAKE_C_COMPILER mpicc)</div><div>SET(CMAKE_CXX_COMPILER mpicxx)</div><div><br></div><div>find_package(PETSC COMPONENTS CXX)</div><div><br></div><div>add_executable(hellopetsc main.cpp)</div></div><div><br></div><div>------------------------------------------------------------</div><div><div>CMake Warning at CMakeLists.txt:9 (find_package):<br></div><div>  By not providing "FindPETSC.cmake" in CMAKE_MODULE_PATH this project has</div><div>  asked CMake to find a package configuration file provided by "PETSC", but</div><div>  CMake did not find one.</div><div><br></div><div>  Could not find a package configuration file provided by "PETSC" with any of</div><div>  the following names:</div><div><br></div><div>    PETSCConfig.cmake</div><div>    petsc-config.cmake</div><div><br></div><div>  Add the installation prefix of "PETSC" to CMAKE_PREFIX_PATH or set</div><div>  "PETSC_DIR" to a directory containing one of the above files.  If "PETSC"</div><div>  provides a separate development package or SDK, be sure it has been</div><div>  installed.</div></div></div>