Skip to content

Commit 6955c7c

Browse files
committed
CMake: use lowercase command names
It was inconsistent, standardize on the KitWare preferred style.
1 parent eaff076 commit 6955c7c

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
@@ -1,21 +1,21 @@
11
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
22
project(clsocket)
33

4-
SET(CLSOCKET_HEADERS
4+
set(CLSOCKET_HEADERS
55
src/ActiveSocket.h
66
src/Host.h
77
src/PassiveSocket.h
88
src/SimpleSocket.h
99
src/StatTimer.h
1010
)
1111

12-
SET(CLSOCKET_SOURCES
12+
set(CLSOCKET_SOURCES
1313
src/SimpleSocket.cpp
1414
src/ActiveSocket.cpp
1515
src/PassiveSocket.cpp
1616
)
1717

18-
OPTION(BUILD_SHARED_LIBS "Build libs as shared" ON)
18+
option(BUILD_SHARED_LIBS "Build libs as shared" ON)
1919
if(DEFINED CLSOCKET_SHARED)
2020
message(FATAL_ERROR "The CLSOCKET_SHARED option is deprecated, instead use BUILD_SHARED_LIBS.")
2121
endif()
@@ -25,7 +25,7 @@ endif()
2525

2626
# make the lib
2727
# add headers so that they appear in IDEs
28-
ADD_LIBRARY(clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS})
28+
add_library(clsocket ${CLSOCKET_SOURCES} ${CLSOCKET_HEADERS})
2929
target_include_directories(clsocket PUBLIC src)
3030
if(WIN32)
3131
target_link_libraries(clsocket PRIVATE Ws2_32)
@@ -36,17 +36,17 @@ install(TARGETS clsocket DESTINATION lib)
3636
install(FILES ${CLSOCKET_HEADERS} DESTINATION include)
3737

3838
if(UNIX)
39-
OPTION(CLSOCKET_EXAMPLES "Build the examples" OFF)
39+
option(CLSOCKET_EXAMPLES "Build the examples" OFF)
4040

4141
if(CLSOCKET_EXAMPLES)
42-
ADD_EXECUTABLE(clsocket-example examples/RecvAsync.cpp)
42+
add_executable(clsocket-example examples/RecvAsync.cpp)
4343
target_link_libraries(clsocket-example clsocket pthread)
4444
install(TARGETS clsocket-example DESTINATION bin)
4545

46-
ADD_EXECUTABLE(querydaytime-example examples/QueryDayTime.cpp)
46+
add_executable(querydaytime-example examples/QueryDayTime.cpp)
4747
target_link_libraries(querydaytime-example clsocket)
4848

49-
ADD_EXECUTABLE(echoserver-example examples/EchoServer.cpp)
49+
add_executable(echoserver-example examples/EchoServer.cpp)
5050
target_link_libraries(echoserver-example clsocket)
5151
endif()
5252
endif()

0 commit comments

Comments
 (0)