Skip to content

Commit

Permalink
Add MSVC-Variable for special includes for InstelliSense
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfgrauberger committed Apr 30, 2018
1 parent d47b54c commit 8b5347a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 3 deletions.
7 changes: 4 additions & 3 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see https://docs.microsoft.com/en-us/cpp/linux/cmake-linux-project#building-a-supported-cmake-release-from-source
# see https://docs.microsoft.com/en-us/cpp/linux/cmake-linux-project#building-a-supported-cmake-release-from-source
cmake_minimum_required(VERSION 3.8)

project (raspberry-example)
Expand All @@ -10,10 +10,11 @@ set(SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
)

if (NOT UNIX)
if (MSVC)
# Diese Includes werden nur benötigt, damit Visual Studio das InstelliSense
# generieren kann und keine InstelliSense-Fehler anzeigt
include_directories(../raspbian-includes ../raspbian-includes/arm-linux-gnueabihf)
include_directories(SYSTEM../raspbian-includes)
include_directories(SYSTEM ../raspbian-includes/arm-linux-gnueabihf)
ENDIF()

add_executable(raspberry-example ${SOURCE})
57 changes: 57 additions & 0 deletions example/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
// Informationen zu dieser Datei finden Sie unter https://go.microsoft.com//fwlink//?linkid=834763.
"configurations": [
{
"name": "Linux-Debug",
"generator": "Unix Makefiles",
"remoteMachineName": "${defaultRemoteMachineName}",
"configurationType": "Debug",
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
"cmakeExecutable": "/usr/local/bin/cmake",
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
"remoteCopySourcesMethod": "sftp",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name": "MSVC",
"value": "ON"
}
],
"inheritEnvironments": [ "linux-x64" ]
},
{
"inheritEnvironments": [ "linux-x64" ],
"name": "Linux-Release",
"generator": "Unix Makefiles",
"remoteMachineName": "${defaultRemoteMachineName}",
"configurationType": "Release",
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
"cmakeExecutable": "/usr/local/bin/cmake",
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
"remoteCopySourcesMethod": "sftp",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name": "MSVC",
"value": "ON"
}
]
}
]
}

0 comments on commit 8b5347a

Please sign in to comment.