Skip to content

Commit

Permalink
update (#10306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael-Hao committed Feb 18, 2022
1 parent 9c0e9a0 commit dace8b7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/Arduino.cmake
Expand Up @@ -43,7 +43,7 @@ if(USE_MICRO)
math(EXPR job_spec_stop "${job_spec_length} - 3")

list(GET job_spec 0 job_src_base)
set(job_src_base "${CMAKE_SOURCE_DIR}/${job_src_base}")
set(job_src_base "${CMAKE_CURRENT_SOURCE_DIR}/${job_src_base}")
foreach(copy_pattern_index RANGE 1 "${job_spec_stop}" 3)
list(GET job_spec ${copy_pattern_index} copy_pattern)
math(EXPR copy_dest_index "${copy_pattern_index} + 2")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/Hexagon.cmake
Expand Up @@ -54,7 +54,7 @@ macro(file_glob_append _output_list)
set(${_output_list} ${_tmp1})
endmacro()

set(TVMRT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/runtime")
set(TVMRT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/runtime")

# First, verify that USE_HEXAGON_DEVICE has a valid value.
if(DEFINED USE_HEXAGON_DEVICE)
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/RustExt.cmake
Expand Up @@ -16,8 +16,8 @@
# under the License.

if(USE_RUST_EXT)
set(RUST_SRC_DIR "${CMAKE_SOURCE_DIR}/rust")
set(CARGO_OUT_DIR "${CMAKE_SOURCE_DIR}/rust/target")
set(RUST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rust")
set(CARGO_OUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rust/target")

if(USE_RUST_EXT STREQUAL "STATIC")
set(COMPILER_EXT_PATH "${CARGO_OUT_DIR}/release/libcompiler_ext.a")
Expand Down
8 changes: 4 additions & 4 deletions cmake/modules/StandaloneCrt.cmake
Expand Up @@ -57,7 +57,7 @@ if(USE_MICRO)
math(EXPR job_spec_stop "${job_spec_length} - 3")

list(GET job_spec 0 job_src_base)
set(job_src_base "${CMAKE_SOURCE_DIR}/${job_src_base}")
set(job_src_base "${CMAKE_CURRENT_SOURCE_DIR}/${job_src_base}")
foreach(copy_pattern_index RANGE 1 "${job_spec_stop}" 3)
list(GET job_spec ${copy_pattern_index} copy_pattern)
math(EXPR copy_dest_index "${copy_pattern_index} + 2")
Expand Down Expand Up @@ -93,7 +93,7 @@ if(USE_MICRO)
endforeach()

set(make_common_args
"CRT_CONFIG=${CMAKE_SOURCE_DIR}/src/runtime/micro/crt_config.h"
"CRT_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/src/runtime/micro/crt_config.h"
"BUILD_DIR=${host_build_dir_abspath}"
"EXTRA_CFLAGS=-fPIC"
"EXTRA_CXXFLAGS=-fPIC"
Expand Down Expand Up @@ -124,9 +124,9 @@ if(USE_MICRO)
# Create the `crttest` target if we can find GTest. If not, we create dummy
# targets that give the user an informative error message.
if(GTEST_FOUND)
tvm_file_glob(GLOB TEST_SRCS ${CMAKE_SOURCE_DIR}/tests/crt/*.cc)
tvm_file_glob(GLOB TEST_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/tests/crt/*.cc)
add_executable(crttest ${TEST_SRCS})
target_include_directories(crttest SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/standalone_crt/include ${CMAKE_SOURCE_DIR}/src/runtime/micro)
target_include_directories(crttest SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/standalone_crt/include ${CMAKE_CURRENT_SOURCE_DIR}/src/runtime/micro)
target_link_libraries(crttest PRIVATE ${cmake_crt_libraries} GTest::GTest GTest::Main pthread dl)
set_target_properties(crttest PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(crttest PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/Zephyr.cmake
Expand Up @@ -43,7 +43,7 @@ if(USE_MICRO)
math(EXPR job_spec_stop "${job_spec_length} - 3")

list(GET job_spec 0 job_src_base)
set(job_src_base "${CMAKE_SOURCE_DIR}/${job_src_base}")
set(job_src_base "${CMAKE_CURRENT_SOURCE_DIR}/${job_src_base}")
foreach(copy_pattern_index RANGE 1 "${job_spec_stop}" 3)
list(GET job_spec ${copy_pattern_index} copy_pattern)
math(EXPR copy_dest_index "${copy_pattern_index} + 2")
Expand Down

0 comments on commit dace8b7

Please sign in to comment.