mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Error out in case of in-source builds (#122037)
Such builds could not succeed, as arch-specific ATen dispatch mechanism will create temporary files that will be added to the build system with every rebuild, which will result in build failures Fixes https://github.com/pytorch/pytorch/issues/121507 Pull Request resolved: https://github.com/pytorch/pytorch/pull/122037 Approved by: https://github.com/PaliC, https://github.com/kit1980
This commit is contained in:
parent
e6a461119a
commit
2ab8b34433
|
|
@ -19,6 +19,12 @@ cmake_policy(SET CMP0069 NEW)
|
||||||
# nice when it's possible, and it's possible on our Windows configs.
|
# nice when it's possible, and it's possible on our Windows configs.
|
||||||
cmake_policy(SET CMP0092 NEW)
|
cmake_policy(SET CMP0092 NEW)
|
||||||
|
|
||||||
|
# Prohibit in-source builds
|
||||||
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||||
|
message(FATAL_ERROR "In-source build are not supported")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# ---[ Project and semantic versioning.
|
# ---[ Project and semantic versioning.
|
||||||
project(Torch CXX C)
|
project(Torch CXX C)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user