Skip to content

Commit

Permalink
Merge pull request #85 from n-claes/bugfix/no_symbols_macOS
Browse files Browse the repository at this point in the history
fix CMake ranlib build no-symbols warnings on macOS
  • Loading branch information
n-claes authored Oct 6, 2021
2 parents ec940db + ff23dd0 commit 0764bb3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ add_definitions(
-D _PARPACK_FOUND=${_PARPACK_FOUND}
)

# avoid "... has no symbols" warnings from ranlib", from
# https://stackoverflow.com/questions/4929255
if (APPLE)
SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(
CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>"
)
endif()

# name of library
set(LEGOLASLIB lego)
# name of executable
Expand Down

0 comments on commit 0764bb3

Please sign in to comment.