mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06: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)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(cpp-ipc)
|
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)
|
add_subdirectory(test)
|
||||||
@ -1,13 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
|
||||||
project(ipc)
|
project(ipc)
|
||||||
|
|
||||||
add_compile_definitions(__IPC_LIBRARY__)
|
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)
|
include_directories(../../include ../../src)
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
|
||||||
project(test)
|
project(test)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
find_package(Qt5Core)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
find_package(Qt5Test)
|
|
||||||
|
|
||||||
if(MSVC)
|
find_package(Qt5 COMPONENTS Core Test REQUIRED)
|
||||||
add_compile_options(/std:c++17)
|
|
||||||
else()
|
if(NOT MSVC)
|
||||||
add_compile_options(-std=gnu++1z -Wno-unused-function -Wno-attributes)
|
add_compile_options(-Wno-unused-function -Wno-attributes)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(../../include ../../src ../../test ../../test/capo)
|
include_directories(../../include ../../src ../../test ../../test/capo)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user