更新: 更好的调试策略
This commit is contained in:
parent
ee6e09acea
commit
8863c2ff2a
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
@ -29,7 +29,7 @@
|
|||
"name": "(gdb) gtest bug",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/gtest/build/vbt_test",
|
||||
"program": "${fileDirname}/build/${fileBasenameNoExtension}",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
|
|
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
|
@ -6,7 +6,7 @@
|
|||
{
|
||||
"type": "shell",
|
||||
"label": "cmake main debug",
|
||||
"command": "/usr/bin/bash",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"cd ${workspaceFolder}/build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make -j4",
|
||||
|
@ -22,10 +22,10 @@
|
|||
{
|
||||
"type": "shell",
|
||||
"label": "cmake test debug",
|
||||
"command": "/usr/bin/bash",
|
||||
"command": "bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"cd ${workspaceFolder}/gtest && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make -j4",
|
||||
"cd ${fileDirname} && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make -j4",
|
||||
],
|
||||
"options": {
|
||||
"cwd": "/bin"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.5.0)
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
project(orderly VERSION 0.1.0)
|
||||
|
||||
SET(CMAKE_BUILD_TYPE "Debug")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
# include(CTest)
|
||||
# enable_testing()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_LIST_DIR}/src
|
||||
|
|
Loading…
Reference in New Issue
Block a user