Commit a21228b6 authored by Christoph Schulz's avatar Christoph Schulz

Conform to `cmakelint --filter=-linelength`

- Lowercase all commands
- Unify indent to 2 spaces
- Remove spaces around brackets
- Remove repitition of condition in else(...) and endif(...)

Note: (re-)running CMake did not change the content of the generated files
parent ca7c03f8
This diff is collapsed.
This diff is collapsed.
...@@ -9,17 +9,17 @@ set(unittests ...@@ -9,17 +9,17 @@ set(unittests
unittest_udp_address unittest_udp_address
) )
#IF (ENABLE_DRAFTS) #if(ENABLE_DRAFTS)
# list(APPEND tests # list(APPEND tests
# ) # )
#ENDIF (ENABLE_DRAFTS) #endif(ENABLE_DRAFTS)
# add location of platform.hpp for Windows builds # add location of platform.hpp for Windows builds
if(WIN32) if(WIN32)
add_definitions(-DZMQ_CUSTOM_PLATFORM_HPP) add_definitions(-DZMQ_CUSTOM_PLATFORM_HPP)
add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
# Same name on 64bit systems # Same name on 64bit systems
link_libraries(ws2_32.lib) link_libraries(ws2_32.lib)
endif() endif()
include_directories("${ZeroMQ_SOURCE_DIR}/include" "${ZeroMQ_SOURCE_DIR}/src" "${ZeroMQ_BINARY_DIR}") include_directories("${ZeroMQ_SOURCE_DIR}/include" "${ZeroMQ_SOURCE_DIR}/src" "${ZeroMQ_BINARY_DIR}")
...@@ -30,24 +30,24 @@ foreach(test ${unittests}) ...@@ -30,24 +30,24 @@ foreach(test ${unittests})
add_executable(${test} ${test}.cpp "unittest_resolver_common.hpp") add_executable(${test} ${test}.cpp "unittest_resolver_common.hpp")
# per-test directories not generated on OS X / Darwin # per-test directories not generated on OS X / Darwin
if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang.*") if(NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang.*")
link_directories(${test} PRIVATE "${ZeroMQ_SOURCE_DIR}/../lib") link_directories(${test} PRIVATE "${ZeroMQ_SOURCE_DIR}/../lib")
endif() endif()
target_link_libraries(${test} libzmq-static ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} unity) target_link_libraries(${test} libzmq-static ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} unity)
if(RT_LIBRARY) if(RT_LIBRARY)
target_link_libraries(${test} ${RT_LIBRARY}) target_link_libraries(${test} ${RT_LIBRARY})
endif() endif()
if(WIN32) if(WIN32)
add_test(NAME ${test} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${test}) add_test(NAME ${test} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${test})
else() else()
add_test(NAME ${test} COMMAND ${test}) add_test(NAME ${test} COMMAND ${test})
endif() endif()
set_tests_properties(${test} PROPERTIES TIMEOUT 10) set_tests_properties(${test} PROPERTIES TIMEOUT 10)
# TODO prevent libzmq (non-static) being in the list of link libraries at all # TODO prevent libzmq (non-static) being in the list of link libraries at all
get_target_property(LIBS ${test} LINK_LIBRARIES) get_target_property(LIBS ${test} LINK_LIBRARIES)
list(REMOVE_ITEM LIBS libzmq) list(REMOVE_ITEM LIBS libzmq)
...@@ -61,7 +61,7 @@ file(GLOB ALL_TEST_SOURCES "test_*.cpp") ...@@ -61,7 +61,7 @@ file(GLOB ALL_TEST_SOURCES "test_*.cpp")
foreach(TEST_SOURCE ${ALL_TEST_SOURCES}) foreach(TEST_SOURCE ${ALL_TEST_SOURCES})
get_filename_component(TESTNAME "${TEST_SOURCE}" NAME_WE) get_filename_component(TESTNAME "${TEST_SOURCE}" NAME_WE)
string(REGEX MATCH "${TESTNAME}" MATCH_TESTNAME "${CURRENT_LIST_FILE_CONTENT}") string(REGEX MATCH "${TESTNAME}" MATCH_TESTNAME "${CURRENT_LIST_FILE_CONTENT}")
if (NOT MATCH_TESTNAME) if(NOT MATCH_TESTNAME)
message(AUTHOR_WARNING "Test '${TESTNAME}' is not known to CTest.") message(AUTHOR_WARNING "Test '${TESTNAME}' is not known to CTest.")
endif() endif()
endforeach() endforeach()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment