Skip to content

prevent adding the gmock subdirectory twice - #91

Merged
wjwwood merged 1 commit into
masterfrom
allocator_and_error_handling_in_c_utilities
Apr 15, 2017
Merged

wjwwood merged 1 commit into
masterfrom
allocator_and_error_handling_in_c_utilities

Conversation

@wjwwood

@wjwwood wjwwood commented Apr 12, 2017 •

Copy link
Copy Markdown
Contributor

This is required to prevent an error like this:

-- Found gmock sources under '/Users/william/ros2_ws/install/src/gmock_vendor/googlemock-1.7.0': C++ tests using 'Google Mock' will be built
-- Found gmock sources under '/Users/william/ros2_ws/install/src/gmock_vendor/googlemock-1.7.0': C++ tests using 'Google Mock' will be built
CMake Error at /Users/william/ros2_ws/install/share/ament_cmake_gmock/cmake/ament_cmake_gmock-extras.cmake:82 (add_subdirectory):
  The binary directory

    /Users/william/ros2_ws/build/c_utilities/gmock

  is already used to build a source directory.  It cannot be used to build
  source directory

    /Users/william/ros2_ws/install/src/gmock_vendor/googlemock-1.7.0

  Specify a unique binary directory name.
Call Stack (most recent call first):
  /Users/william/ros2_ws/install/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:46 (_ament_cmake_gmock_find_gmock)
  CMakeLists.txt:64 (ament_add_gmock)

Which occurs when you use ament_add_gmock from more than one CMakeLists.txt in a single project.

ament_gtest is protected in a similar fashion, but for a different reason it seems:

Connects to ros2/rcutils#16

@wjwwood wjwwood added bug Something isn't working in review Waiting for review (Kanban column) labels Apr 12, 2017
@wjwwood wjwwood self-assigned this Apr 12, 2017
@wjwwood

wjwwood commented Apr 15, 2017

Copy link
Copy Markdown
Contributor Author

I tested this on its own, CI:

  • Linux:
    • Build Status
  • Linux-aarch64:
    • Build Status
  • macOS:
    • Build Status (known compiler warning from Fast-RTPS)
  • Windows:
    • Build Status

@wjwwood
wjwwood merged commit 936d678 into master Apr 15, 2017
@wjwwood
wjwwood deleted the allocator_and_error_handling_in_c_utilities branch April 15, 2017 00:29
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants