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

Commit

Permalink
Suppress all compiler warning for Windows build
Browse files Browse the repository at this point in the history
- Also move `ament_export..` macros before `install(..)`

Signed-off-by: Michael Orlov <[email protected]>
  • Loading branch information
MichaelOrlov committed Oct 27, 2022
1 parent fc5f8aa commit 9aa40e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions mcap_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ if(NOT CMAKE_CXX_STANDARD)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
elseif(MSVC)
# Suppress all compiler warning for Windows build
add_compile_options(/w)
endif()

## Define vendor macro
Expand Down Expand Up @@ -50,14 +53,18 @@ macro(build_mcap_vendor)
)
ament_target_dependencies(mcap zstd)

ament_export_include_directories(include/${PROJECT_NAME})
ament_export_targets(export_mcap HAS_LIBRARY_TARGET)
ament_export_dependencies(zstd_vendor zstd)

install(
DIRECTORY ${_mcap_include_dir}/mcap
DESTINATION include/${PROJECT_NAME}
)

install(
TARGETS mcap
EXPORT mcap
EXPORT export_mcap
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
Expand All @@ -67,9 +74,5 @@ endmacro()
## Call vendor macro
build_mcap_vendor()

ament_export_include_directories(include/${PROJECT_NAME})
ament_export_targets(mcap HAS_LIBRARY_TARGET)
ament_export_dependencies(zstd_vendor zstd)

## Package
ament_package()

0 comments on commit 9aa40e0

Please sign in to comment.