Unverified Commit b7f097ec authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

print llvm build choice and allow cmake arg to override env var (#2266)

* print llvm build choice and allow cmake arg to override env var

* fix cmake error

* use existing function
parent 5dc708a1
......@@ -16,6 +16,9 @@
cmake_minimum_required (VERSION 3.1)
# set directory where the custom finders live
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not allowed.")
endif()
......@@ -24,7 +27,8 @@ if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
message(FATAL_ERROR "Ninja generator not supported.")
endif()
include(cmake/Modules/git_tags.cmake)
include(git_tags)
include(var_functions)
NGRAPH_GET_VERSION_LABEL()
......@@ -88,18 +92,11 @@ message(STATUS "NGRAPH_FORWARD_CMAKE_ARGS ${NGRAPH_FORWARD_CMAKE_ARGS}")
# Prevent Eigen from using any LGPL3 code
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_MPL2_ONLY -DTBB_USE_THREADING_TOOLS")
if($ENV{NGRAPH_USE_PREBUILT_LLVM})
set(NGRAPH_USE_PREBUILT_LLVM TRUE)
endif()
ngraph_var(NGRAPH_USE_PREBUILT_LLVM DEFAULT "FALSE")
# Create compilation database compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set directory where the custom finders live
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
include(var_functions)
option(NGRAPH_UNIT_TEST_ENABLE "Control the building of unit tests" TRUE)
option(NGRAPH_TOOLS_ENABLE "Control the building of tool" TRUE)
option(NGRAPH_CPU_ENABLE "Control the building of the CPU backend" TRUE)
......@@ -135,6 +132,7 @@ message(STATUS "NGRAPH_DEX_ONLY: ${NGRAPH_DEX_ONLY}")
message(STATUS "NGRAPH_CODE_COVERAGE_ENABLE: ${NGRAPH_CODE_COVERAGE_ENABLE}")
message(STATUS "NGRAPH_LIB_VERSIONING_ENABLE: ${NGRAPH_LIB_VERSIONING_ENABLE}")
message(STATUS "NGRAPH_PYTHON_BUILD_ENABLE: ${NGRAPH_PYTHON_BUILD_ENABLE}")
message(STATUS "NGRAPH_USE_PREBUILT_LLVM: ${NGRAPH_USE_PREBUILT_LLVM}")
if (NGRAPH_ONNX_IMPORT_ENABLE)
option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system provided Protobuf shared object" FALSE)
......
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