Skip to content

Commit daba626

Browse files
ur_controllers: Fix compilation on Windows (backport #1402) (#1412)
Co-authored-by: Silvio Traversaro <[email protected]>
1 parent 2e19549 commit daba626

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ur_controllers/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ project(ur_controllers)
44
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
55
add_compile_options(-Wall -Wextra)
66
endif()
7+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
78

89
find_package(ament_cmake REQUIRED)
910
find_package(angles REQUIRED)
@@ -119,7 +120,9 @@ ament_target_dependencies(${PROJECT_NAME}
119120
${THIS_PACKAGE_INCLUDE_DEPENDS}
120121
)
121122

122-
target_compile_options(${PROJECT_NAME} PRIVATE -Wpedantic -Werror=return-type)
123+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
124+
target_compile_options(${PROJECT_NAME} PRIVATE -Wpedantic -Werror=return-type)
125+
endif()
123126

124127
# prevent pluginlib from using boost
125128
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")

0 commit comments

Comments
 (0)