1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

warn user in the case of in-source builds

This commit is contained in:
Vadim Pisarevsky
2011-06-23 12:37:35 +00:00
parent 168a6c3751
commit f7fec3c1b5
+5
View File
@@ -1608,6 +1608,11 @@ message(STATUS " cvconfig.h is in: ${OPENCV_CONFIG_FILE_INCLUDE_DIR
message(STATUS "-----------------------------------------------------------------")
message(STATUS "")
# warn in the case of in-source build
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
endif()
#----------------------------------------------------------------------------
# Generate the OpenCVConfig.cmake file for unix
# installation in CMAKE_INSTALL_PREFIX