Skip to content

Commit

Permalink
object -> static
Browse files Browse the repository at this point in the history
Signed-off-by: Carl Pearson <cwpears@sandia.gov>
  • Loading branch information
cwpearson committed Jan 17, 2025
1 parent 845da9c commit 642b144
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions profiling/perfetto-connector/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# perfetto/perfetto.cc is third-part code, so we want to disable all warnings for it
add_library(perfetto_obj OBJECT perfetto/perfetto.cc)
# perfetto/perfetto.cc is third-party code, so we want to disable all warnings for it
add_library(perfetto_static STATIC perfetto/perfetto.cc)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(perfetto_obj PRIVATE -w)
target_compile_options(perfetto_static PRIVATE -w)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(perfetto_obj PRIVATE /w)
target_compile_options(perfetto_static PRIVATE /w)
endif()

kp_add_library(kp_perfetto_connector libperfetto-connector.cpp $<TARGET_OBJECTS:perfetto_obj>)
kp_add_library(kp_perfetto_connector libperfetto-connector.cpp)
target_link_libraries(kp_perfetto_connector PRIVATE perfetto_static)

# mark as system so we don't get warnings from perfetto.h either
target_include_directories(kp_perfetto_connector PRIVATE SYSTEM perfetto)

0 comments on commit 642b144

Please sign in to comment.