Skip to content

Commit

Permalink
Merge pull request #2106 from ucb-bar/tests-builddir
Browse files Browse the repository at this point in the history
Don't specify a nondefault CMAKE_RUNTIME_OUTPUT_DIRECTORY
  • Loading branch information
jerryz123 authored Nov 12, 2024
2 parents 9c3a39d + 48306ac commit 9975582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ run_binary () {
}

build_tests() {
cmake $LOCAL_CHIPYARD_DIR/tests/ -S $LOCAL_CHIPYARD_DIR/tests/ -B $LOCAL_CHIPYARD_DIR/tests/build/ -D CMAKE_BUILD_TYPE=Debug
cmake --build $LOCAL_CHIPYARD_DIR/tests/build/ --target all
(cd $LOCAL_CHIPYARD_DIR/tests && cmake . && make)
}

case $1 in
Expand Down
6 changes: 2 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ set(CMAKE_OBJCOPY "${TOOLCHAIN_PREFIX}objcopy")
set(CMAKE_OBJDUMP "${TOOLCHAIN_PREFIX}objdump")
set(CMAKE_SIZE "${TOOLCHAIN_PREFIX}size")


set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/..")
set(CMAKE_EXECUTABLE_SUFFIX ".riscv")


Expand Down Expand Up @@ -98,8 +96,8 @@ add_custom_target(dump ALL)
# Function to add disassembly target for an executable
function(add_dump_target target_name)
add_custom_target(${target_name}-dump
BYPRODUCTS ${CMAKE_SOURCE_DIR}/${target_name}.dump
COMMAND ${CMAKE_OBJDUMP} -D $<TARGET_FILE:${target_name}> > ${CMAKE_SOURCE_DIR}/${target_name}.dump
BYPRODUCTS ${CMAKE_BINARY_DIR}/${target_name}.dump
COMMAND ${CMAKE_OBJDUMP} -D $<TARGET_FILE:${target_name}> > ${CMAKE_BINARY_DIR}/${target_name}.dump
DEPENDS ${target_name}
COMMENT "Generating disassembly for ${target_name}"
)
Expand Down

0 comments on commit 9975582

Please sign in to comment.