mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
update CMakeLists.txt
This commit is contained in:
parent
5bb8c37578
commit
6700956c63
@ -1,3 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(cpp-ipc)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
endif()
|
||||
|
||||
add_subdirectory(test)
|
||||
@ -1,13 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(ipc)
|
||||
|
||||
add_compile_definitions(__IPC_LIBRARY__)
|
||||
if(MSVC)
|
||||
add_compile_options(/std:c++17)
|
||||
else()
|
||||
add_compile_options(-std=gnu++1z)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
endif()
|
||||
|
||||
include_directories(../../include ../../src)
|
||||
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(test)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
find_package(Qt5Core)
|
||||
find_package(Qt5Test)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/std:c++17)
|
||||
else()
|
||||
add_compile_options(-std=gnu++1z -Wno-unused-function -Wno-attributes)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||
find_package(Qt5 COMPONENTS Core Test REQUIRED)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_compile_options(-Wno-unused-function -Wno-attributes)
|
||||
endif()
|
||||
|
||||
include_directories(../../include ../../src ../../test ../../test/capo)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user