mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-08 01:36:46 +08:00
27 lines
820 B
CMake
Executable File
27 lines
820 B
CMake
Executable File
project(test-ipc)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
find_package(Qt5 COMPONENTS Core Test REQUIRED)
|
|
|
|
if(NOT MSVC)
|
|
add_compile_options(-Wno-attributes -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-function)
|
|
endif()
|
|
|
|
include_directories(../../include ../../src ../../test)
|
|
file(GLOB SRC_FILES ../../test/*.cpp)
|
|
file(GLOB HEAD_FILES ../../test/*.h)
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../output)
|
|
|
|
link_directories(${EXECUTABLE_OUTPUT_PATH} ${CMAKE_SOURCE_DIR}/../test/gperftools)
|
|
add_subdirectory(../ipc ipc.out)
|
|
|
|
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HEAD_FILES})
|
|
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Test ipc)
|
|
if(NOT MSVC)
|
|
target_link_libraries(${PROJECT_NAME} pthread rt)
|
|
endif()
|
|
|
|
#target_link_libraries(${PROJECT_NAME} tcmalloc_minimal)
|