Skip to content

Commit

Permalink
Switch to CMAKE_CURRENT_BINARY_DIR for consistency with CTest
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Oct 23, 2019
1 parent d0925c1 commit baa766b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ament_cmake_test/cmake/ament_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# :param TIMEOUT: the test timeout in seconds, default: 60
# :type TIMEOUT: integer
# :param WORKING_DIRECTORY: the working directory for invoking the
# command in, default: PROJECT_SOURCE_DIR
# command in, default: CMAKE_CURRENT_BINARY_DIR
# :type WORKING_DIRECTORY: string
# :param GENERATE_RESULT_FOR_RETURN_CODE_ZERO: generate a test result
# file when the command invocation returns with code zero
Expand Down Expand Up @@ -77,7 +77,7 @@ function(ament_add_test testname)
"valid number and greater than zero")
endif()
if(NOT ARG_WORKING_DIRECTORY)
set(ARG_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(ARG_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()

# wrap command with run_test script to ensure test result generation
Expand Down

0 comments on commit baa766b

Please sign in to comment.