Skip to content

Commit

Permalink
eliminated gflags related linker warnings (google#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Apr 8, 2021
1 parent efc341d commit c59122e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,19 @@ if (gflags_FOUND)

if (NOT BUILD_SHARED_LIBS)
# Don't use __declspec(dllexport|dllimport) if this is a static build
targeT_compile_definitions (glog PUBLIC GFLAGS_DLL_DECLARE_FLAG= GFLAGS_DLL_DEFINE_FLAG=)
target_compile_definitions (glog
PRIVATE GFLAGS_DLL_DECLARE_FLAG
PRIVATE GFLAGS_DLL_DEFINE_FLAG
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DECLARE_FLAG=>"
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DEFINE_FLAG=>"
)
else (NOT BUILD_SHARED_LIBS)
target_compile_definitions (glog
PRIVATE GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL
PRIVATE GFLAGS_DLL_DEFINE_FLAG=GOOGLE_GLOG_DLL_DECL
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DECLARE_FLAG=GOOGLE_GLOG_DLL_DECL>"
PUBLIC "$<BUILD_INTERFACE:GFLAGS_DLL_DEFINE_FLAG=GOOGLE_GLOG_DLL_DECL>"
)
endif (NOT BUILD_SHARED_LIBS)
endif (gflags_FOUND)

Expand Down

0 comments on commit c59122e

Please sign in to comment.