Skip to content

Use Boost::boost imported target in CMake configuration#520

Merged
ScottWillcox merged 2 commits intofeature/GRIDEDIT-1926-build-meshkernel-on-macos-with-clang-compilerfrom
copilot/sub-pr-514
Jan 20, 2026
Merged

Use Boost::boost imported target in CMake configuration#520
ScottWillcox merged 2 commits intofeature/GRIDEDIT-1926-build-meshkernel-on-macos-with-clang-compilerfrom
copilot/sub-pr-514

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Addresses review feedback from #514 to modernize Boost dependency handling in CMake.

Changes

  • Replaced manual target_include_directories with Boost::boost imported target
  • Removed explicit ${Boost_INCLUDE_DIRS} variable usage

Before:

find_package(Boost REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})

target_link_libraries(
  ${TARGET_NAME}
  LINK_PUBLIC
    Triangle
    OpenMP::OpenMP_CXX
    Eigen3::Eigen
)

After:

find_package(Boost REQUIRED)

target_link_libraries(
  ${TARGET_NAME}
  LINK_PUBLIC
    Triangle
    OpenMP::OpenMP_CXX
    Eigen3::Eigen
    Boost::boost
)

The imported target automatically propagates include directories and follows CMake 3.5+ best practices.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ScottWillcox <54632073+ScottWillcox@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gitlab.com
    • Triggering command: /usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] WIP Address feedback on GRIDEDIT-1926 for MeshKernel build on MacOS Use Boost::boost imported target in CMake configuration Jan 20, 2026
Copilot AI requested a review from ScottWillcox January 20, 2026 12:57
@ScottWillcox ScottWillcox marked this pull request as ready for review January 20, 2026 13:48
@ScottWillcox ScottWillcox merged commit 2de407e into feature/GRIDEDIT-1926-build-meshkernel-on-macos-with-clang-compiler Jan 20, 2026
16 checks passed
@ScottWillcox ScottWillcox deleted the copilot/sub-pr-514 branch January 20, 2026 13:49
ScottWillcox added a commit that referenced this pull request Feb 3, 2026
)

*NOTE*
Bypassing rules to merge. Sonarcloud rule is failing due to code coverage, this has not been changed by this PR, this is already an issue on main.
Failed conditions
 79.7% Coverage on New Code (required ≥ 80%)


* GRIDEDIT-1926 Update cmake compiler configuration to use Apple/Clang on MacOS

* GRIDEDIT-1926 Disabled CMP0175 during netcdf_static build.

produces to many log entries.

* GRIDEDIT-1926 Updating README.md file with information regarding Apple/Clang building MeshKernel on MacOS

* GRIDEDIT-1926 compiler directives and code changes required for building with Apple/Clang on MacOS

* GRIDEDIT-1926 updated github workflow configuration to build MeshKernel using Apple/Clang

* GRIDEDIT-1926 export zlib path

* GRIDEDIT-1926 echo commands to find out where the libz.1.dylib can be found

* GRIDEDIT-1926 Creating links so that the libz lib can be found.

* GRIDEDIT-1926 Explicitly constructs the UndoActionForMesh struct with designated member initialization.

* GRIDEDIT-1926 fix: Make CMake OpenMP and architecture flags conditional per runner architecture (#515)

* GRIDEDIT-1926 fix: Make CMake OpenMP and architecture flags conditional per runner architecture
* GRIDEDIT-1926 Replaced BoundingBox constructor calls with aggregate initialization
* GRIDEDIT-1926 ignore more boost directories.
* GRIDEDIT-1926 add compiler config "-Wno-unused-parameter" for boost.

* GRIDEDIT-1926 Changed point location to prevent rounding errors

Due to different platform architectures and compilers rounding errors may occur.
ARM64 vs intel resulting in different results.

* GRIDEDIT-1926 Handling review comments. Removed 'brew update'.

github action runners use upto date versions of brew.(Doing brew update can take a long time)

* GRIDEDIT-1926 '-Wno-unused-parameters' behind optional configuration parameter (#517)

* GRIDEDIT-1926 '-Wno-unused-parameters' behind optional configuration. Only needed on MacOS15-intel runners
* Update cmake/compiler_config.cmake

Fix typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused ARCH_FLAG variable from workflow (#518)

* Initial plan

* Remove unused ARCH_FLAG variable

Co-authored-by: ScottWillcox <54632073+ScottWillcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ScottWillcox <54632073+ScottWillcox@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>

* Use Boost::boost imported target in CMake configuration (#520)

* Initial plan

* Use Boost::boost imported target instead of manual include directories

Co-authored-by: ScottWillcox <54632073+ScottWillcox@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ScottWillcox <54632073+ScottWillcox@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants