Skip to content

Commit

Permalink
Merge pull request microsoft#4 from NonStatic2014/trmccorm/cmake_tool…
Browse files Browse the repository at this point in the history
…chain

Set CMAKE_TOOLCHAIN_FILE in build.py
  • Loading branch information
NonStatic2014 authored Mar 5, 2019
2 parents 530d651 + 2596f02 commit 7f51a09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmake/onnxruntime_hosting.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${ONNXRUNTIME_ROOT}/cmake/external/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

project(onnxruntime_hosting)

find_package(Boost 1.68 COMPONENTS system coroutine context thread program_options REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
if pb_home:
cmake_args += ["-DONNX_CUSTOM_PROTOC_EXECUTABLE=" + os.path.join(pb_home,'bin','protoc'), '-Donnxruntime_USE_PREBUILT_PB=ON']

if args.build_hosting:
toolchain_path = os.path.join(cmake_dir, 'external', 'vcpkg', 'scripts', 'buildsystems', 'vcpkg.cmake')
cmake_args += ["-DCMAKE_TOOLCHAIN_FILE=" + toolchain_path]

cmake_args += ["-D{}".format(define) for define in cmake_extra_defines]

if is_windows():
Expand Down

0 comments on commit 7f51a09

Please sign in to comment.