Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 9aa40e0

Browse files
committed
Suppress all compiler warning for Windows build
- Also move `ament_export..` macros before `install(..)` Signed-off-by: Michael Orlov <[email protected]>
1 parent fc5f8aa commit 9aa40e0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

mcap_vendor/CMakeLists.txt

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ if(NOT CMAKE_CXX_STANDARD)
1414
endif()
1515
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1616
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
17+
elseif(MSVC)
18+
# Suppress all compiler warning for Windows build
19+
add_compile_options(/w)
1720
endif()
1821

1922
## Define vendor macro
@@ -50,14 +53,18 @@ macro(build_mcap_vendor)
5053
)
5154
ament_target_dependencies(mcap zstd)
5255

56+
ament_export_include_directories(include/${PROJECT_NAME})
57+
ament_export_targets(export_mcap HAS_LIBRARY_TARGET)
58+
ament_export_dependencies(zstd_vendor zstd)
59+
5360
install(
5461
DIRECTORY ${_mcap_include_dir}/mcap
5562
DESTINATION include/${PROJECT_NAME}
5663
)
5764

5865
install(
5966
TARGETS mcap
60-
EXPORT mcap
67+
EXPORT export_mcap
6168
ARCHIVE DESTINATION lib
6269
LIBRARY DESTINATION lib
6370
RUNTIME DESTINATION bin
@@ -67,9 +74,5 @@ endmacro()
6774
## Call vendor macro
6875
build_mcap_vendor()
6976

70-
ament_export_include_directories(include/${PROJECT_NAME})
71-
ament_export_targets(mcap HAS_LIBRARY_TARGET)
72-
ament_export_dependencies(zstd_vendor zstd)
73-
7477
## Package
7578
ament_package()

0 commit comments

Comments
 (0)