You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/cmake/CheckOutOfSourceBuild.cmake

22 lines
1.0 KiB
CMake

#--------------------------
# Prohibit in-source builds
#--------------------------
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(FATAL_ERROR "ERROR! "
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}"
"\nThis archive does not support in-source builds:\n"
"You must now delete the CMakeCache.txt file and the CMakeFiles/ directory under "
"the 'src' source directory or you will not be able to configure correctly!"
"\nYou must now run something like:\n"
" $ rm -r CMakeCache.txt CMakeFiles/"
"\n"
"Please create a directory outside the ${CMAKE_PROJECT_NAME} source tree and build under that outside directory "
"in a manner such as\n"
" $ mkdir build\n"
" $ cd build\n"
" $ CC=gcc FC=gfortran cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir /path/to/psblas3/src/dir \n"
"\nsubstituting the appropriate syntax for your shell (the above line assumes the bash shell)."
)
endif()