适配:关闭严格警告,剩余仅存链接问题
This commit is contained in:
parent
54b56216fa
commit
e30cc8e7f9
|
@ -15,7 +15,7 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithD
|
|||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0") # Debug模式:禁用优化,包含调试符号
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") # Release模式:最大优化[2,6](@ref)
|
||||
if(MSVC)
|
||||
add_compile_options(/W4 /WX) # Windows: 开启所有警告并视警告为错误
|
||||
#add_compile_options(/W4 /WX) # Windows: 开启所有警告并视警告为错误
|
||||
add_compile_options(/utf-8)
|
||||
else()
|
||||
add_compile_options(-Wall -Wextra -Wpedantic -Werror) # Linux/macOS: 严格警告[1](@ref)
|
||||
|
@ -38,8 +38,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|||
|
||||
include_directories(include)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "DataPlatform/*.cpp" "DataPlatform/*.c") # 自动收集源码,建议手动指定关键文件
|
||||
file(GLOB_RECURSE HEADERS "include/*.hpp" "include/*.h")
|
||||
file(GLOB_RECURSE SOURCES "DataPlatform/*.cpp" "DataPlatform/*.c" "DataPlatform/*.cc") # 自动收集源码,建议手动指定关键文件
|
||||
file(GLOB_RECURSE HEADERS "DataPlatform/*.hpp" "DataPlatform/*.h")
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "webqt_global.h"
|
||||
#include "webengineview.h"
|
||||
#include "qwebengineview.h"
|
||||
#include <qwidget.h>
|
||||
#include <QMouseEvent>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
|
Loading…
Reference in New Issue