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