Skip to content

Commit 7c92738

Browse files
authored
ur_controllers: Fix compilation on Windows
1 parent 4b28496 commit 7c92738

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)
@@ -133,7 +134,9 @@ target_link_libraries(${PROJECT_NAME}
133134
tf2_ros::tf2_ros
134135
)
135136

136-
target_compile_options(${PROJECT_NAME} PRIVATE -Wpedantic -Werror)
137+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
138+
target_compile_options(${PROJECT_NAME} PRIVATE -Wpedantic -Werror)
139+
endif()
137140

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

0 commit comments

Comments
 (0)