You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/02/25 20:33:15 UTC

[arrow] branch master updated: ARROW-4660: [C++] Use set_target_properties for defining GFLAGS_IS_A_DLL

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 46f75d7  ARROW-4660: [C++] Use set_target_properties for defining GFLAGS_IS_A_DLL
46f75d7 is described below

commit 46f75d7383f0d8ae3202db7e9394152036ef36f3
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Mon Feb 25 14:33:04 2019 -0600

    ARROW-4660: [C++] Use set_target_properties for defining GFLAGS_IS_A_DLL
    
    target_compile_definitions() for imported library needs CMake 3.11 or
    later.
    
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #3737 from kou/cpp-support-cmake-3.10-again and squashes the following commits:
    
    876e68f2 <Kouhei Sutou>  Use set_target_properties for defining GFLAGS_IS_A_DLL
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 726db85..9a8f503 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -655,11 +655,11 @@ if(ARROW_NEED_GFLAGS)
     ADD_THIRDPARTY_LIB(gflags
       STATIC_LIB ${GFLAGS_STATIC_LIB})
     set(GFLAGS_LIBRARY gflags_static)
-    target_compile_definitions(${GFLAGS_LIBRARY} INTERFACE "GFLAGS_IS_A_DLL=0")
-    if(MSVC)
+    if(WIN32)
       set_target_properties(${GFLAGS_LIBRARY}
 	PROPERTIES
-	INTERFACE_LINK_LIBRARIES "shlwapi.lib")
+	INTERFACE_LINK_LIBRARIES "shlwapi.lib"
+	INTERFACE_COMPILE_DEFINITIONS "GFLAGS_IS_A_DLL=0")
     endif()
     add_dependencies(${GFLAGS_LIBRARY} gflags_ep)
   endif()