Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Fix windows compilation #3330

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
branches: [ gazebo11 ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: linux-build
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set (GAZEBO_VERSION_FULL ${GAZEBO_MAJOR_VERSION}.${GAZEBO_MINOR_VERSION}.${GAZEB

message (STATUS "${PROJECT_NAME} version ${GAZEBO_VERSION_FULL}")

set(CMAKE_CXX_STANDARD 17)

set (gazebo_cmake_dir ${PROJECT_SOURCE_DIR}/cmake CACHE PATH "Location of CMake scripts")

if(DEFINED ENABLE_TESTS_COMPILATION)
Expand Down
4 changes: 4 additions & 0 deletions gazebo/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ if (UNIX)
target_link_libraries(gazebo_common PRIVATE pthread)
endif()

# if (WIN32)
# target_link_libraries(gazebo_common PRIVATE ABSL_CONSUME_DLL)
# endif()

if (UNIX AND NOT APPLE)
# rt is used for clock_gettime, which is not available on apple or windows
target_link_libraries(gazebo_common PRIVATE rt)
Expand Down
5 changes: 5 additions & 0 deletions gazebo/msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ target_link_libraries(gazebomsgs_out ${GZ_PROTOBUF_LIBRARY} ${GZ_PROTOBUF_PROTOC
if (UNIX)
target_link_libraries(gazebomsgs_out pthread)
endif()

if (WIN32)
target_compile_definitions(gazebomsgs_out PUBLIC ABSL_CONSUME_DLL)
endif()

# Visual Studio enables c++11 support by default
if (NOT MSVC)
if(CMAKE_VERSION VERSION_LESS 3.8.2)
Expand Down