mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josep...@apache.org
Subject [21/27] mesos git commit: CMake: Removed duplication inside control statements.
Date Mon, 12 Jun 2017 23:16:27 GMT
CMake: Removed duplication inside control statements.

In the past, we would duplicate the text inside each `if (...)` into
the corresponding `endif (...)`.  This duplication is not necessary.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d84e4a14
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d84e4a14
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d84e4a14

Branch: refs/heads/master
Commit: d84e4a148ac7fe8903daeb97b71dec766c1709d6
Parents: dc4adbf
Author: Joseph Wu <josephwu@apache.org>
Authored: Thu Jun 8 15:53:56 2017 -0700
Committer: Joseph Wu <josephwu@apache.org>
Committed: Mon Jun 12 13:09:35 2017 -0700

----------------------------------------------------------------------
 .../cmake/Process3rdpartyConfigure.cmake        | 16 ++++-----
 .../libprocess/cmake/ProcessConfigure.cmake     | 38 ++++++++++----------
 3rdparty/libprocess/src/CMakeLists.txt          | 16 ++++-----
 3rdparty/libprocess/src/tests/CMakeLists.txt    |  6 ++--
 4 files changed, 38 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d84e4a14/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index debc67c..cc0cde7 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -64,11 +64,11 @@ if (WIN32)
     ${LIBEVENT_ROOT}/include
     ${LIBEVENT_ROOT}-build/include)
   set(ZLIB_INCLUDE_DIR     ${ZLIB_ROOT} ${ZLIB_ROOT}-build)
-else (WIN32)
+else ()
   set(GLOG_INCLUDE_DIR     ${GLOG_LIB_ROOT}/include)
   set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_LIB_ROOT}/include)
   set(LIBEVENT_INCLUDE_DIR ${LIBEVENT_LIB_ROOT}/include)
-endif (WIN32)
+endif ()
 
 # Convenience variables for `lib` directories of built third-party dependencies.
 set(LIBEV_LIB_DIR       ${LIBEV_ROOT}-build/.libs)
@@ -80,12 +80,12 @@ if (WIN32)
   set(LIBEVENT_LIB_DIR    ${LIBEVENT_ROOT}-build/lib)
   set(PROTOBUF_LIB_DIR    ${PROTOBUF_ROOT}-build)
   set(ZLIB_LIB_DIR        ${ZLIB_ROOT}-build)
-else (WIN32)
+else ()
   set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
   set(GLOG_LIB_DIR        ${GLOG_LIB_ROOT}/lib)
   set(LIBEVENT_LIB_DIR    ${LIBEVENT_LIB_ROOT}/lib)
   set(PROTOBUF_LIB_DIR    ${PROTOBUF_LIB_ROOT}/lib)
-endif (WIN32)
+endif ()
 
 # Convenience variables for "lflags", the symbols we pass to CMake to generate
 # things like `-L/path/to/glog` or `-lglog`.
@@ -127,19 +127,19 @@ if (WIN32)
   # to the build system directly (such as, as a git submodule), glog's
   # targets would be inherited.
   set(GLOG_LFLAG     glog Dbghelp)
-else (WIN32)
+else ()
   set(CURL_LFLAG     curl)
   set(DL_LFLAG       dl)
   set(PROTOBUF_LFLAG protobuf)
   set(SASL_LFLAG     sasl2)
-endif (WIN32)
+endif ()
 
 # Convenience variable for `protoc`, the Protobuf compiler.
 if (NOT WIN32)
   set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
-else (NOT WIN32)
+else ()
   set(PROTOC ${PROTOBUF_ROOT}-build/$<CONFIG>/protoc.exe)
-endif (NOT WIN32)
+endif ()
 
 # Configure the process library, the last of our third-party libraries.
 #######################################################################

http://git-wip-us.apache.org/repos/asf/mesos/blob/d84e4a14/3rdparty/libprocess/cmake/ProcessConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessConfigure.cmake b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
index d1ee17e..2c46d43 100755
--- a/3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -42,7 +42,7 @@
 
 if (ENABLE_SSL)
   find_package(OpenSSL REQUIRED)
-endif (ENABLE_SSL)
+endif ()
 
 set(PROCESS_PACKAGE_VERSION 0.0.1)
 set(PROCESS_PACKAGE_SOVERSION 0)
@@ -63,7 +63,7 @@ macro(GROUP_PROCESS_HEADERS)
     "${PROCESS_INCLUDE_DIR}/process"
     "${PROCESS_INCLUDE_DIR}/process"
     "*.h*")
-endmacro(GROUP_PROCESS_HEADERS)
+endmacro()
 
 # Define process library dependencies. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
@@ -76,16 +76,16 @@ set(PROCESS_DEPENDENCIES
 
 if (NOT ENABLE_LIBEVENT)
   set(PROCESS_DEPENDENCIES ${PROCESS_DEPENDENCIES} ${LIBEV_TARGET})
-elseif (ENABLE_LIBEVENT)
+else ()
   set(PROCESS_DEPENDENCIES ${PROCESS_DEPENDENCIES} ${LIBEVENT_TARGET})
-endif (NOT ENABLE_LIBEVENT)
+endif ()
 
 if (WIN32)
   set(PROCESS_DEPENDENCIES
     ${PROCESS_DEPENDENCIES}
     ${GZIP_TARGET}
     )
-endif (WIN32)
+endif ()
 
 # Define third-party include directories. Tells compiler toolchain where to get
 # headers for our third party libs (e.g., -I/path/to/glog on Linux).
@@ -107,30 +107,30 @@ if (NOT ENABLE_LIBEVENT)
     ${PROCESS_3RDPARTY_INCLUDE_DIRS}
     ${LIBEV_INCLUDE_DIR}
     )
-elseif (ENABLE_LIBEVENT)
+else ()
   set(PROCESS_3RDPARTY_INCLUDE_DIRS
     ${PROCESS_3RDPARTY_INCLUDE_DIRS}
     ${LIBEVENT_INCLUDE_DIR}
     )
-endif (NOT ENABLE_LIBEVENT)
+endif ()
 
 if (ENABLE_SSL)
   set(PROCESS_3RDPARTY_INCLUDE_DIRS
     ${PROCESS_3RDPARTY_INCLUDE_DIRS}
     ${OPENSSL_INCLUDE_DIR}
     )
-endif (ENABLE_SSL)
+endif ()
 
 if (HAS_GPERFTOOLS)
   set(PROCESS_3RDPARTY_INCLUDE_DIRS ${PROCESS_3RDPARTY_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIR})
-endif (HAS_GPERFTOOLS)
+endif ()
 
 if (WIN32)
   set(PROCESS_3RDPARTY_INCLUDE_DIRS
     ${PROCESS_3RDPARTY_INCLUDE_DIRS}
     ${ZLIB_INCLUDE_DIR}
   )
-endif (WIN32)
+endif ()
 
 # Define third-party lib install directories. Used to tell the compiler
 # toolchain where to find our third party libs (e.g., -L/path/to/glog on
@@ -144,16 +144,16 @@ set(PROCESS_LIB_DIRS
 
 if (NOT ENABLE_LIBEVENT)
   set(PROCESS_LIB_DIRS ${PROCESS_LIB_DIRS} ${LIBEV_LIB_DIR})
-elseif (ENABLE_LIBEVENT)
+else ()
   set(PROCESS_LIB_DIRS ${PROCESS_LIB_DIRS} ${LIBEVENT_LIB_DIR})
-endif (NOT ENABLE_LIBEVENT)
+endif ()
 
 if (WIN32)
   set(PROCESS_LIB_DIRS
     ${PROCESS_LIB_DIRS}
     ${ZLIB_LIB_DIR}
     )
-endif (WIN32)
+endif ()
 
 # Define third-party libs. Used to generate flags that the linker uses to
 # include our third-party libs (e.g., -lglog on Linux).
@@ -171,20 +171,20 @@ if (WIN32)
     ${PROCESS_LIBS}
     userenv
     )
-endif (WIN32)
+endif ()
 
 if (NOT ENABLE_LIBEVENT)
   set(PROCESS_LIBS ${PROCESS_LIBS} ${LIBEV_LFLAG})
-elseif (ENABLE_LIBEVENT)
+else ()
   set(PROCESS_LIBS ${PROCESS_LIBS} ${LIBEVENT_LFLAG})
-endif (NOT ENABLE_LIBEVENT)
+endif ()
 
 if (ENABLE_SSL)
   set(PROCESS_LIBS
     ${PROCESS_LIBS}
     ${OPENSSL_LIBRARIES}
     )
-endif (ENABLE_SSL)
+endif ()
 
 if (NOT WIN32)
   find_package(ZLIB REQUIRED)
@@ -195,11 +195,11 @@ if (NOT WIN32)
   # folders individually.
   if (LINUX)
     set(PROCESS_LIBS ${PROCESS_LIBS} rt)
-  endif (LINUX)
+  endif ()
 
   set(PROCESS_LIBS
     ${PROCESS_LIBS}
     ${ZLIB_LIBRARIES}
     pthread
     )
-endif (NOT WIN32)
+endif ()

http://git-wip-us.apache.org/repos/asf/mesos/blob/d84e4a14/3rdparty/libprocess/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/CMakeLists.txt b/3rdparty/libprocess/src/CMakeLists.txt
index 5ffdaec..670dc15 100644
--- a/3rdparty/libprocess/src/CMakeLists.txt
+++ b/3rdparty/libprocess/src/CMakeLists.txt
@@ -22,12 +22,12 @@ if (WIN32)
     ${PROCESS_SRC}
     subprocess_windows.cpp
     )
-else (WIN32)
+else ()
   set(PROCESS_SRC
     ${PROCESS_SRC}
     subprocess_posix.cpp
     )
-endif (WIN32)
+endif ()
 
 set(PROCESS_SRC
   ${PROCESS_SRC}
@@ -68,14 +68,14 @@ if (ENABLE_LIBEVENT)
     libevent.cpp
     libevent_poll.cpp
     )
-else (ENABLE_LIBEVENT)
+else ()
   set(PROCESS_SRC
     ${PROCESS_SRC}
     libev.hpp
     libev.cpp
     libev_poll.cpp
     )
-endif (ENABLE_LIBEVENT)
+endif ()
 
 if (ENABLE_SSL)
   set(PROCESS_SRC
@@ -91,8 +91,8 @@ if (ENABLE_SSL)
       ${PROCESS_SRC}
       libevent_ssl_socket.cpp
       )
-  endif (ENABLE_LIBEVENT)
-endif (ENABLE_SSL)
+  endif ()
+endif ()
 
 # INCLUDE DIRECTIVES FOR PROCESS LIBRARY (generates, e.g., -I/path/to/thing
 # on Linux).
@@ -109,14 +109,14 @@ link_directories(${PROCESS_LIB_DIRS})
 #######################################################################
 if (WIN32)
   add_library(${PROCESS_TARGET} STATIC ${PROCESS_SRC})
-else (WIN32)
+else ()
   add_library(${PROCESS_TARGET} SHARED ${PROCESS_SRC})
 
   set_target_properties(
     ${PROCESS_TARGET} PROPERTIES
     POSITION_INDEPENDENT_CODE TRUE
     )
-endif (WIN32)
+endif ()
 
 GROUP_STOUT_HEADERS()
 GROUP_PROCESS_HEADERS()

http://git-wip-us.apache.org/repos/asf/mesos/blob/d84e4a14/3rdparty/libprocess/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/CMakeLists.txt b/3rdparty/libprocess/src/tests/CMakeLists.txt
index 7b72ca5..3fc8d98 100644
--- a/3rdparty/libprocess/src/tests/CMakeLists.txt
+++ b/3rdparty/libprocess/src/tests/CMakeLists.txt
@@ -48,7 +48,7 @@ if (NOT WIN32)
     io_tests.cpp
     reap_tests.cpp
     )
-endif (NOT WIN32)
+endif ()
 
 if (ENABLE_SSL)
   set(PROCESS_TESTS_SRC
@@ -56,7 +56,7 @@ if (ENABLE_SSL)
     jwt_tests.cpp
     ssl_tests.cpp
     )
-endif (ENABLE_SSL)
+endif ()
 
 
 # ADDITIONAL CPP FLAGS FOR PROCESS TEST BINARY (e.g., -DBUILD_DIR=...).
@@ -104,7 +104,7 @@ if (ENABLE_SSL)
   add_executable(ssl-client EXCLUDE_FROM_ALL ssl_client.cpp)
   target_link_libraries(ssl-client ${PROCESS_TEST_LIBS})
   add_dependencies(${PROCESS_TESTS_TARGET} ssl-client)
-endif (ENABLE_SSL)
+endif ()
 
 # ADD TEST TARGET (runs when you do, e.g., `make check`).
 #########################################################


Mime
View raw message