2020-04-01 02:26:05 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0.0)
|
2020-03-31 15:52:46 +00:00
|
|
|
project(orderly VERSION 0.1.0)
|
|
|
|
|
2020-03-31 16:22:51 +00:00
|
|
|
SET(CMAKE_BUILD_TYPE "Debug")
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
|
|
|
|
|
2020-04-01 02:35:56 +00:00
|
|
|
option(ENABLE_TEST "gtest build" OFF)
|
|
|
|
|
2020-04-01 02:26:05 +00:00
|
|
|
# include(CTest)
|
|
|
|
# enable_testing()
|
2020-03-31 15:52:46 +00:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/src
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
)
|
|
|
|
|
|
|
|
link_directories(
|
|
|
|
/usr/lib/
|
|
|
|
/usr/local/lib/
|
|
|
|
)
|
|
|
|
|
2020-04-01 02:35:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
if(ENABLE_TEST)
|
|
|
|
add_subdirectory(gtest)
|
|
|
|
endif(ENABLE_TEST)
|
|
|
|
|
2020-03-31 15:52:46 +00:00
|
|
|
add_executable(orderly src/main.cpp)
|
|
|
|
|
|
|
|
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
|
|
|
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
|
|
|
include(CPack)
|