Wes McKinney created ARROW-5425:
-----------------------------------

             Summary: [C++] Non-determinism encountered with cmake-format 0.5.1
                 Key: ARROW-5425
                 URL: https://issues.apache.org/jira/browse/ARROW-5425
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
            Reporter: Wes McKinney


I ran cmake-format 0.5.1 locally and experienced non-deterministic changes that 
break the build such as

{code:diff}
diff --git a/cpp/cmake_modules/BuildUtils.cmake 
b/cpp/cmake_modules/BuildUtils.cmake
index 45cff6e9c..c80f21f34 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -179,7 +179,7 @@ function(ADD_ARROW_LIB LIB_NAME)
   else()
     # Otherwise, generate a single "objlib" from all C++ modules and link
     # that "objlib" into each library kind, to avoid compiling twice
-    add_library(${LIB_NAME}_objlib OBJECT ${ARG_SOURCES})
+    add_library(${LIB_NAME}_objlib ${ARG_SOURCES} OBJECT)
     # Necessary to make static linking into other shared libraries work 
properly
     set_property(TARGET ${LIB_NAME}_objlib PROPERTY POSITION_INDEPENDENT_CODE 
1)
     if(ARG_DEPENDENCIES)
{code}

I also found that some uses of {{UNKNOWN IMPORTED}} were rewritten as 
{{IMPORTED UNKNOWN}}. I have run cmake-format a few more times and haven't 
observed this again but wanted to report it in case anyone else encounters



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to