-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (30 loc) · 2.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.9)
project(judge_client)
set(CMAKE_CXX_STANDARD 17)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
if (EXISTS "/usr/local/bin/gcc-9")
set(CMAKE_C_COMPILER /usr/local/bin/gcc-9)
set(CMAKE_CXX_COMPILER /usr/local/bin/g++-9)
elseif (EXISTS "/usr/local/bin/gcc-8")
set(CMAKE_C_COMPILER /usr/local/bin/gcc-8)
set(CMAKE_CXX_COMPILER /usr/local/bin/g++-8)
elseif (EXISTS "/usr/local/bin/gcc")
set(CMAKE_C_COMPILER /usr/local/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/local/bin/g++)
else ()
set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
endif ()
set(CMAKE_CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# set(CMAKE_C_COMPILER /usr/local/bin/gcc)
# set(CMAKE_CXX_COMPILER /usr/local/bin/g++)
# handle the QUIETLY and REQUIRED arguments and set MYSQL_FOUND to TRUE if
# all listed variables are TRUE
find_package(Threads)
add_executable(judge_client header/okcalls.h header/ncalls.h header/okcalls32.h header/okcalls64.h library/json.hpp library/easywsclient.cpp library/easywsclient.hpp judge_client.cpp model/websocket/WebSocketSender.cpp model/websocket/WebSocketSender.h library/judge_lib.h header/static_var.h model/base/JSONVectorReader.h model/base/JSONVectorReader.cpp model/base/Bundle.cpp model/base/Bundle.h library/judge_lib.h.cpp header/static_var.cpp model/base/Pack.cpp model/base/Pack.h model/wrapper/CompilerConfigReader.cpp model/wrapper/CompilerConfigReader.h model/base/ThreadPool.h model/submission/SubmissionInfo.cpp model/submission/SubmissionInfo.h model/judge/language/Language.cpp model/judge/language/Language.h model/judge/policy/SpecialJudge.cpp model/judge/policy/SpecialJudge.h model/config/ConfigInfo.cpp model/config/ConfigInfo.h manager/syscall/InitManager.cpp manager/syscall/InitManager.h external/mysql/MySQLSubmissionAdapter.cpp external/mysql/MySQLSubmissionAdapter.h)
add_executable(wsjudged wsjudged.cpp)
target_link_libraries(judge_client ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(judge_client ${CMAKE_DL_LIBS})