2016-07-25 03:21:56 +00:00
|
|
|
cmake_minimum_required(VERSION 2.5)
|
|
|
|
project(judger C)
|
|
|
|
|
|
|
|
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
2016-08-21 09:59:39 +00:00
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/output)
|
2016-07-25 03:21:56 +00:00
|
|
|
|
|
|
|
set(BASE_CMAKE_C_FLAGS "-Wall -Werror -O3 -std=c99")
|
|
|
|
set(CMAKE_C_FLAGS "${BASE_CMAKE_C_FLAGS}")
|
|
|
|
|
|
|
|
|
|
|
|
# make judger lib
|
2016-10-07 09:06:55 +00:00
|
|
|
file(GLOB SOURCE "src/*.c" "src/rules/*.c")
|
2016-07-25 03:21:56 +00:00
|
|
|
add_library(judger SHARED ${SOURCE})
|
2016-10-07 09:06:55 +00:00
|
|
|
target_link_libraries(judger pthread seccomp)
|
2016-07-25 03:21:56 +00:00
|
|
|
|
|
|
|
|
2016-08-21 09:59:39 +00:00
|
|
|
install(DIRECTORY output/ DESTINATION /usr/lib/judger)
|