File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 6
6
#
7
7
# ----------------------------------------------------------------------------
8
8
9
+ # Disable in-source builds to prevent source tree corruption.
10
+ if (" ${CMAKE_SOURCE_DIR} " STREQUAL " ${CMAKE_BINARY_DIR} " )
11
+ message (FATAL_ERROR "
12
+ FATAL: In-source builds are not allowed.
13
+ You should create separate directory for build files.
14
+ " )
15
+ endif ()
9
16
10
17
11
18
include (cmake/OpenCVMinDepVersions.cmake )
@@ -1397,13 +1404,6 @@ status("")
1397
1404
1398
1405
ocv_finalize_status ()
1399
1406
1400
- # ----------------------------------------------------------------------------
1401
- # Warn in the case of in-source build
1402
- # ----------------------------------------------------------------------------
1403
- if ("${CMAKE_CURRENT_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_BINARY_DIR} " )
1404
- message (WARNING "The source directory is the same as binary directory. \" make clean\" may damage the source tree" )
1405
- endif ()
1406
-
1407
1407
# ----------------------------------------------------------------------------
1408
1408
# CPack stuff
1409
1409
# ----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments