{
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/C",
// The path to VsDevCmd.bat depends on the version of Visual Studio you have installed.
"\"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/Tools/VsDevCmd.bat\"",
"&&"
]
}
}
},
"tasks": [
{
"type": "shell",
"label": "CreateBuildDir",
"windows":{
"command": "mkdir",
"args": [
"build"
],
},
"linux":{
"command": "mkdir",
"args": [
"-p",
"build"
],
},
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
},
{
"type": "shell",
"label": "cmake",
"windows": {
"command": "cmake",
"args": [
// "-G",
// "Visual Studio 15 2017",
"-A",
"x64",
"-DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo",
"-DCMAKE_PREFIX_PATH=D:\\Qt\\Qt5.9.2\\5.9.2\\msvc2017_64;D:\\protobuf\\cmake\\build\\Release",
// "-DBOOST_ROOT=D:\\Boost\\boost_1_65_1",
"-DBOOST_INCLUDEDIR=D:\\Boost\\boost_1_65_1",
"-DBOOST_LIBRARYDIR=D:\\Boost\\boost_1_65_1\\lib64-msvc-14.1",
"-DTRAFFICCONTROL=1",
"-DProtobuf_INCLUDE_DIR=D:\\protobuf\\src",
"-DProtobuf_LIBRARY=D:\\protobuf\\cmake\\build\\Release\\libprotobuf.lib",
"../"
]
},
"linux": {
"command": "cmake",
"args": [
"..",
"-DCMAKE_BUILD_TYPE=Debug",
"-DCMAKE_PREFIX_PATH=\"/opt/Qt5.9.8/5.9.8/gcc_64;/usr/local/lib/protobuf/build/\"",
"-DTRAFFICCONTROL=1",
"-DProtobuf_INCLUDE_DIR=\"/usr/local/lib/protobuf/src\"",
"-DProtobuf_LIBRARY=\"/usr/local/lib/protobuf/build/libprotobuf.a\"",
"-DBOOST_ROOT=\"/usr/local/boost\"",
"-DBOOST_INCLUDEDIR=\"/usr/local/boost/include/boost\"",
"-DBOOST_LIBRARYDIR=\"/usr/local/boost/lib\""
]
},
"options": {
"cwd": "${workspaceFolder}/build"
},
// "dependsOn": [
// "CreateBuildDir"
// ],
"problemMatcher": []
},
{
"type": "shell",
"label": "build",
"windows":{
"command": "msbuild",
"args": [
"HMI_Trafficcontrol.sln",
"/p:Platform=x64",
"/m:10",
"/v:minimal",
"-p:MinimalRebuild=true"
]
},
"linux":{
"command": "make",
"args": [
"-j$(nproc)"
]
},
"options": {
"cwd": "${workspaceFolder}/build"
},
"dependsOn": [
"cmake"
]
}
]
}