Skip to content

Commit ee17955

Browse files
committed
CMake: use lowercase command names
It was inconsistent, standardize on the KitWare preferred style.
1 parent 61c9903 commit ee17955

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CMakeLists.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ set(BUILD_MINOR "4")
77
set(BUILD_VERSION "3")
88
set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_VERSION})
99

10-
SET(CLSOCKET_HEADERS
10+
set(CLSOCKET_HEADERS
1111
src/ActiveSocket.h
1212
src/Host.h
1313
src/PassiveSocket.h
1414
src/SimpleSocket.h
1515
src/StatTimer.h
1616
)
1717

18-
SET(CLSOCKET_SOURCES
18+
set(CLSOCKET_SOURCES
1919
src/SimpleSocket.cpp
2020
src/ActiveSocket.cpp
2121
src/PassiveSocket.cpp
2222
)
2323

24-
OPTION(BUILD_SHARED_LIBS "Build libs as shared" ON)
24+
option(BUILD_SHARED_LIBS "Build libs as shared" ON)
2525
if(DEFINED CLSOCKET_SHARED)
2626
message(FATAL_ERROR "The CLSOCKET_SHARED option is deprecated, instead use BUILD_SHARED_LIBS.")
2727
endif()
@@ -31,7 +31,7 @@ endif()
3131

3232
# make the lib
3333
# add headers so that they appear in IDEs
34-
ADD_LIBRARY(clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS})
34+
add_library(clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS})
3535
target_include_directories(clsocket PUBLIC src)
3636
if(WIN32)
3737
add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
@@ -51,17 +51,17 @@ set_target_properties(clsocket PROPERTIES VERSION ${BUILD_VERSION}
5151
SOVERSION ${BUILD_MAJOR})
5252

5353
if(UNIX)
54-
OPTION(CLSOCKET_EXAMPLES "Build the examples" OFF)
54+
option(CLSOCKET_EXAMPLES "Build the examples" OFF)
5555

5656
if(CLSOCKET_EXAMPLES)
57-
ADD_EXECUTABLE(clsocket-example examples/RecvAsync.cpp)
57+
add_executable(clsocket-example examples/RecvAsync.cpp)
5858
target_link_libraries(clsocket-example clsocket pthread)
5959
install(TARGETS clsocket-example DESTINATION bin)
6060

61-
ADD_EXECUTABLE(querydaytime-example examples/QueryDayTime.cpp)
61+
add_executable(querydaytime-example examples/QueryDayTime.cpp)
6262
target_link_libraries(querydaytime-example clsocket)
6363

64-
ADD_EXECUTABLE(echoserver-example examples/EchoServer.cpp)
64+
add_executable(echoserver-example examples/EchoServer.cpp)
6565
target_link_libraries(echoserver-example clsocket)
6666
endif()
6767
endif()

0 commit comments

Comments
 (0)