Я изучаю проект cmake в visual studio 2017. Это не похоже на работу.Но строительство и выполнение работает хорошо.Почему не работает intellisense?
project directory(CMakeLists.txt, CMakeSettings.json)
main directory(main.c, CMakeLists.txt)
include directory(myprint.h)
printstatic directory(printstatic.c, CMakeLists.txt)
printshared directory(printshared.c, CMakeLists.txt)
"myprint.h"
#include <stdio.h>
void print_test_static_library();
void print_test_shared_library();
"main.c"
#include "myprint.h"
int main()
{
for (int ii = 0; ii < 3; ++ii) {
printf("Hello CMake..................\n");
print_test_static_library();
print_test_shared_library();
}
return 0;
}
"CMakeLists.txt of main"
cmake_minimum_required (VERSION 3.8)
add_executable (main "main.c")
target_link_libraries(main printstatic printshared)
"printstatic.c"
#include "myprint.h"
void print_test_static_library()
{
printf("Test Static Library..................\n");
}
"CMakeLists.txt из printstatic"
cmake_minimum_required (VERSION 3.8)
add_library (printstatic "printstatic.c")
"printshared.c "
#include "myprint.h"
void print_test_shared_library()
{
printf("Test Shared Library..................\n");
}
" CMakeLists.txt of printshared "
cmake_minimum_required (VERSION 3.8)
add_library (printshared SHARED "printshared.c")
" CMakeLists.txt проекта "
cmake_minimum_required (VERSION 3.8)
set(CMAKE_C_STANDARD 99)
project ("CMakeProjectTest")
include_directories(${PROJECT_SOURCE_DIR}/include)
add_subdirectory ("printstatic")
add_subdirectory ("printshared")
add_subdirectory ("main")
" CMakeSettings.json "
{
"configurations": [
{
"name": "Linux-Debug",
"generator": "Unix Makefiles",
"remoteMachineName": "${defaultRemoteMachineName}",
"configurationType": "Debug",
"remoteCMakeListsRoot": "/home/mary/proj/src/${workspaceHash}/${name}",
"cmakeExecutable": "/usr/local/bin/cmake",
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"remoteBuildRoot": "/home/mary/proj/build/${workspaceHash}/build/${name}",
"remoteInstallRoot": "/home/mary/proj/build/${workspaceHash}/install/${name}",
"remoteCopySources": true,
"remoteCopySourcesOutputVerbosity": "Normal",
"remoteCopySourcesConcurrentCopies": "10",
"remoteCopySourcesMethod": "sftp",
"remoteCopySourcesExclusionList": [
".vs",
".git"
],
"rsyncCommandArgs": "-t --delete --delete-excluded",
"remoteCopyBuildOutput": false,
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [
"linux_x64"
]
}
]
}