hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7574) Make cmake work in Windows Visual Studio 2010
Date Mon, 05 Jan 2015 17:12:34 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264778#comment-14264778
] 

Colin Patrick McCabe commented on HDFS-7574:
--------------------------------------------

{code}
-TRY_COMPILE(STRERROR_R_RETURN_INT
-	${CMAKE_BINARY_DIR}
-	${CMAKE_SOURCE_DIR}/CMake/CMakeTestCompileStrerror.cpp
-	OUTPUT_VARIABLE OUTPUT)
-
-MESSAGE(STATUS "Checking whether strerror_r returns an int")
-
-IF(STRERROR_R_RETURN_INT)
-	MESSAGE(STATUS "Checking whether strerror_r returns an int -- yes")
-ELSE(STRERROR_R_RETURN_INT)
-	MESSAGE(STATUS "Checking whether strerror_r returns an int -- no")
-ENDIF(STRERROR_R_RETURN_INT)
+IF(MSVC)
+    # strerror_s, the equivalent of strerror_r in Windows, always return an int.
+    SET(STRERROR_R_RETURN_INT TRUE CACHE INTERNAL "strerror_r returns int in Windows")
+ELSE(IF)
+    TRY_COMPILE(STRERROR_R_RETURN_INT
+        ${CMAKE_BINARY_DIR}
+        ${CMAKE_SOURCE_DIR}/CMake/CMakeTestCompileStrerror.cpp
+        OUTPUT_VARIABLE OUTPUT)
+
+    MESSAGE(STATUS "Checking whether strerror_r returns an int")
+
+    IF(STRERROR_R_RETURN_INT)
+        MESSAGE(STATUS "Checking whether strerror_r returns an int -- yes")
+    ELSE(STRERROR_R_RETURN_INT)
+        MESSAGE(STATUS "Checking whether strerror_r returns an int -- no")
+    ENDIF(STRERROR_R_RETURN_INT)
+ENDIF(MSVC)
{code}

Do we need this?  Shouldn't the existing test just pick this up?

+1 once that's addressed

> Make cmake work in Windows Visual Studio 2010
> ---------------------------------------------
>
>                 Key: HDFS-7574
>                 URL: https://issues.apache.org/jira/browse/HDFS-7574
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>         Environment: Windows Visual Studio 2010
>            Reporter: Thanh Do
>            Assignee: Thanh Do
>         Attachments: HDFS-7574-branch-HDFS-6994-1.patch
>
>
> Cmake should be able to generate a solution file in Windows Visual Studio 2010. This
is the first step in a series of steps making libhdfs3 built successfully in Windows. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message