nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

MacOS: cmake-built libraries produce linker warnings #1789

Open excaliburtb opened 5 days ago

excaliburtb commented 5 days ago

this isn't actually a Trick issue, I'm just trying to spread the word on something I observed on latest MacOS 14.7.

packages that build using cmake on Mac may start seeing the linker warning: ld: warning: object file (/Users/tbrain/repos/groot/IDF/build/libidf.a[88](hidapi.o)) was built for newer 'macOS' version (14.7) than being linked (14.0)

not sure when it started but cmake started automatically adding the compiler switch -mmacosx-version-min=14.7. it seems that when compiling with Trick and without a specified macosx-version-min value it resorts to 14.0. the easiest fix I found so far is for users to add: set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) to their cmake scripts especially if detecting a trick build. There may be better solutions...

sharmeye commented 1 day ago

Thanks for bringing this to our attention so we won't be surprised