Judger/CMakeLists.txt

18 lines
485 B
CMake
Raw Normal View History

2016-07-25 03:21:56 +00:00
cmake_minimum_required(VERSION 2.5)
project(judger C)
#set(CMAKE_VERBOSE_MAKEFILE ON)
2017-12-18 09:54:01 +00:00
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/output)
2016-07-25 03:21:56 +00:00
2017-12-18 09:54:01 +00:00
set(CMAKE_C_FLAGS "-g -Wall -Werror -O3 -std=c99 -pie -fPIC")
2016-07-25 03:21:56 +00:00
# make judger lib
2016-10-07 09:06:55 +00:00
file(GLOB SOURCE "src/*.c" "src/rules/*.c")
2017-12-18 09:54:01 +00:00
add_executable(libjudger.so ${SOURCE})
target_link_libraries(libjudger.so pthread seccomp)
2016-07-25 03:21:56 +00:00
2017-12-18 09:54:01 +00:00
install(FILES output/libjudger.so
PERMISSIONS OWNER_EXECUTE OWNER_READ
DESTINATION /usr/lib/judger)