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

Avoid compiler warnings #2054

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
4 changes: 4 additions & 0 deletions examples/developer_guide/3_simple_cpp_stage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN")

# Set the option prefix to match the outer project before including. Must be before find_package(morpheus)
set(OPTION_PREFIX "MORPHEUS")

# Set the policy to allow for CMP0144, avoids warning about MORPHEUS_ROOT being set
cmake_policy(SET CMP0144 NEW)

find_package(morpheus REQUIRED)

morpheus_utils_initialize_cpm(MORPHEUS_CACHE_DIR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Set the option prefix to match the outer project before including. Must be before find_package(morpheus)
set(OPTION_PREFIX "MORPHEUS")

# Set the policy to allow for CMP0144, avoids warning about MORPHEUS_ROOT being set
cmake_policy(SET CMP0144 NEW)

find_package(morpheus REQUIRED)

morpheus_utils_initialize_cpm(MORPHEUS_CACHE_DIR)
Expand Down
3 changes: 3 additions & 0 deletions python/morpheus/morpheus/_lib/cmake/libmorpheus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ add_dependencies(morpheus ${cudf_helpers_target})
# In debug mode, dont allow missing symbols
target_link_options(morpheus PUBLIC "$<$<CONFIG:Debug>:-Wl,--no-allow-shlib-undefined>")

# Avoid warning from the lto-wrapper about serial compilation
target_link_options(morpheus PUBLIC "-flto=auto")

# Generates an include file for specifying external linkage since everything is hidden by default
generate_export_header(morpheus
NO_EXPORT_MACRO_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ target_include_directories(morpheus_llm
# In debug mode, dont allow missing symbols
target_link_options(morpheus_llm PUBLIC "$<$<CONFIG:Debug>:-Wl,--no-allow-shlib-undefined>")

# Avoid warning from the lto-wrapper about serial compilation
target_link_options(morpheus_llm PUBLIC "-flto=auto")

# Ideally, we dont use glob here. But there is no good way to guarantee you dont miss anything like *.cpp
file(GLOB_RECURSE morpheus_llm_public_headers
LIST_DIRECTORIES FALSE
Expand Down
Loading