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 )
@@ -1386,13 +1393,6 @@ status("")
1386
1393
1387
1394
ocv_finalize_status ()
1388
1395
1389
- # ----------------------------------------------------------------------------
1390
- # Warn in the case of in-source build
1391
- # ----------------------------------------------------------------------------
1392
- if ("${CMAKE_CURRENT_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_BINARY_DIR} " )
1393
- message (WARNING "The source directory is the same as binary directory. \" make clean\" may damage the source tree" )
1394
- endif ()
1395
-
1396
1396
# ----------------------------------------------------------------------------
1397
1397
# CPack stuff
1398
1398
# ----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments