Commit 6dfde1b6 authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

Fix check to prevent in-tree builds (#2099)

* disable in-tree build

* check to prevent in-tree builds
parent cc277b6c
......@@ -111,3 +111,6 @@ python/share/*
python/pybind11/
# remnants from a failed in-source build
CMakeCache.txt
CMakeFiles/
......@@ -16,6 +16,10 @@
cmake_minimum_required (VERSION 3.1)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not allowed.")
endif()
include(cmake/Modules/git_tags.cmake)
NGRAPH_GET_VERSION_LABEL()
......@@ -74,10 +78,6 @@ if($ENV{NGRAPH_USE_PREBUILT_LLVM})
set(NGRAPH_USE_PREBUILT_LLVM TRUE)
endif()
# These variables are undocumented but useful.
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# Create compilation database compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment