Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework: Enable CMAKE_LINK_LIBRARIES_ONLY_TARGETS #12362

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ SET(${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION_DEFAULT FALSE

SET(Trilinos_USE_GNUINSTALLDIRS_DEFAULT ON)

SET(Trilinos_MUST_FIND_ALL_TPL_LIBS_DEFAULT TRUE)

SET(CMAKE_LINK_LIBRARIES_ONLY_TARGETS ON)

# Set up C++ language standard selection
include(SetTrilinosCxxStandard)

Expand All @@ -107,8 +111,6 @@ INSTALL_BUILD_STATS_SCRIPTS()
# Install TriBITS so that other projects can use it
include(SetupTribitsInstall)

SET(Trilinos_MUST_FIND_ALL_TPL_LIBS_DEFAULT TRUE)

IF(${PROJECT_NAME}_ENABLE_YouCompleteMe)
INCLUDE(CodeCompletion)
ENDIF()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ ENDIF()
# LibM not available under MSVC.
IF(NOT MSVC)
# Add libm linking for ceil, floor and such.
LIST(APPEND IMPORTEDLIBS m)
add_library(SuiteSparse::m INTERFACE IMPORTED)
set_property(TARGET SuiteSparse::m PROPERTY IMPORTED_LIBNAME "m")
LIST(APPEND IMPORTEDLIBS SuiteSparse::m)
ENDIF()

TRIBITS_ADD_LIBRARY(
Expand Down
4 changes: 3 additions & 1 deletion packages/zoltan/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,9 @@ ENDIF()

IF(NOT MSVC)
# Add libm linking for ceil, floor and such.
LIST(APPEND IMPORTEDLIBS m)
add_library(Zoltan::m INTERFACE IMPORTED)
set_property(TARGET Zoltan::m PROPERTY IMPORTED_LIBNAME "m")
LIST(APPEND IMPORTEDLIBS Zoltan::m)
ENDIF()

TRIBITS_ADD_LIBRARY(
Expand Down