2020-09-27 21:49:55 +08:00
|
|
|
enable_language(CXX)
|
|
|
|
include(../cmake/compiler.cmake)
|
|
|
|
|
2019-08-31 22:13:02 +08:00
|
|
|
add_executable(mdbx_test
|
2018-11-04 23:57:36 +08:00
|
|
|
base.h
|
|
|
|
cases.cc
|
|
|
|
chrono.cc
|
|
|
|
chrono.h
|
|
|
|
config.cc
|
|
|
|
config.h
|
|
|
|
copy.cc
|
|
|
|
dead.cc
|
|
|
|
hill.cc
|
|
|
|
jitter.cc
|
|
|
|
keygen.cc
|
|
|
|
keygen.h
|
|
|
|
log.cc
|
|
|
|
log.h
|
|
|
|
main.cc
|
|
|
|
osal.h
|
2020-04-15 22:09:37 +08:00
|
|
|
osal-unix.cc
|
|
|
|
osal-windows.cc
|
2018-11-04 23:57:36 +08:00
|
|
|
test.cc
|
|
|
|
test.h
|
|
|
|
try.cc
|
|
|
|
utils.cc
|
|
|
|
utils.h
|
2019-02-04 03:37:57 +08:00
|
|
|
append.cc
|
2019-06-22 03:42:45 +08:00
|
|
|
ttl.cc
|
2019-10-10 04:38:44 +08:00
|
|
|
nested.cc
|
2018-11-04 23:57:36 +08:00
|
|
|
)
|
2018-01-04 14:27:09 +08:00
|
|
|
|
2020-06-26 07:57:46 +08:00
|
|
|
if(MDBX_CXX_STANDARD)
|
|
|
|
set_target_properties(mdbx_test PROPERTIES
|
|
|
|
CXX_STANDARD ${MDBX_CXX_STANDARD} CXX_STANDARD_REQUIRED ON)
|
|
|
|
endif()
|
|
|
|
|
2019-08-31 22:13:02 +08:00
|
|
|
set_target_properties(mdbx_test PROPERTIES
|
2020-06-26 07:57:46 +08:00
|
|
|
INTERPROCEDURAL_OPTIMIZATION $<BOOL:${INTERPROCEDURAL_OPTIMIZATION}>)
|
2020-04-15 22:09:37 +08:00
|
|
|
target_setup_options(mdbx_test)
|
2018-01-04 14:27:09 +08:00
|
|
|
|
2020-04-15 22:09:37 +08:00
|
|
|
target_link_libraries(mdbx_test ${TOOL_MDBX_LIB} ${LIB_MATH} ${CMAKE_THREAD_LIBS_INIT})
|
2019-08-31 22:13:02 +08:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
|
|
target_link_libraries(mdbx_test winmm.lib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(UNIX AND NOT SUBPROJECT)
|
2020-04-15 22:09:37 +08:00
|
|
|
add_executable(pcrf_test pcrf/pcrf_test.c)
|
|
|
|
target_include_directories(pcrf_test PRIVATE "${PROJECT_SOURCE_DIR}")
|
|
|
|
target_link_libraries(pcrf_test ${TOOL_MDBX_LIB})
|
2019-08-31 22:13:02 +08:00
|
|
|
endif()
|