Fix compilation in a directory.

This commit is contained in:
2018-04-01 22:20:49 +02:00
parent 9333d9b4ea
commit 2e7ebe6c47
2 changed files with 13 additions and 7 deletions

16
.vscode/tasks.json vendored
View File

@@ -2,16 +2,19 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558 // See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
"version": "2.0.0", "version": "2.0.0",
"cwd": "${workspaceRoot}/_builds/x86_64_domo-debug/buidlroot/build",
"env": {
"test": "toto"
},
"tasks": [ "tasks": [
{ {
"label": "X86_64 - cmake - domod", "label": "X86_64 - cmake - domod",
"type": "shell", "type": "shell",
"command": "cmake -DSRC_DIR=${workspaceRoot} -DCMAKE_BUILD_TYPE=Debug -DworkspaceRoot=${workspaceRoot} -DCMAKE_TOOLCHAIN_FILE=${workspaceRoot}/bsp/cmake-modules/toolchain-buildroot.cmake ${workspaceRoot}/src/prog/domod/builders/cmake", "command": "mkdir -p ${BUILD_DIR}/domo && cd ${BUILD_DIR}/domo && cmake -DSRC_DIR=${workspaceRoot} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${workspaceRoot}/bsp/cmake-modules/toolchain-buildroot.cmake ${workspaceRoot}/src/prog/domod/builders/cmake",
"group": "build", "group": "build",
"options": {
"cwd": "${workspaceRoot}/_builds/x86_64_domo-debug/buildroot/build/",
"env": {
"BUILD_DIR": "${workspaceRoot}/_builds/x86_64_domo-debug/buildroot/build/"
}
},
"presentation": { "presentation": {
"echo": true, "echo": true,
"reveal": "always" "reveal": "always"
@@ -19,6 +22,9 @@
}, },
{ {
"label": "X86_64 - make - domod", "label": "X86_64 - make - domod",
"options": {
"cwd": "${workspaceRoot}/_builds/x86_64_domo-debug/buildroot/build/domo",
},
"type": "shell", "type": "shell",
"command": "make", "command": "make",
"group": "build", "group": "build",

View File

@@ -7,8 +7,8 @@ SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler # specify the cross compiler
SET(CMAKE_C_COMPILER ${workspaceRoot}/_builds/x86_64_domo-debug/cross/usr/bin/x86_64-linux-gcc) SET(CMAKE_C_COMPILER ${SRC_DIR}/_builds/x86_64_domo-debug/cross/usr/bin/x86_64-linux-gcc)
SET(CMAKE_CXX_COMPILER ${workspaceRoot}/_builds/x86_64_domo-debug/cross/usr/bin/x86_64-linux-g++) SET(CMAKE_CXX_COMPILER ${SRC_DIR}/_builds/x86_64_domo-debug/cross/usr/bin/x86_64-linux-g++)
# search for programs in the build host directories # search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)