CMakeLists.txt 422 字节
Newer Older
1
find_package(benchmark CONFIG REQUIRED)
羽飞's avatar
羽飞 已提交
2

3 4
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/observer)

羽飞's avatar
羽飞 已提交
5 6 7 8 9 10
FILE(GLOB_RECURSE ALL_SRC *.cpp)
# AUX_SOURCE_DIRECTORY 类似功能
FOREACH (F ${ALL_SRC})
    get_filename_component(prjName ${F} NAME_WE)
    MESSAGE("Build ${prjName} according to ${F}")
    ADD_EXECUTABLE(${prjName} ${F})
11
    TARGET_LINK_LIBRARIES(${prjName} common pthread dl benchmark observer_static)
羽飞's avatar
羽飞 已提交
12
ENDFOREACH (F)