-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target install missing #504
Comments
Just to be sure, did you provide an install target? |
Yes, I did and it worked well before the latest update.
…On Wed, 1 Aug 2018 at 13:18, Randshot ***@***.***> wrote:
Just to be sure, did you provide an *install* target?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#504 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKxuMGjs1iCcsKQvv6C5sTi2vlhPmDE3ks5uMY6igaJpZM4Vp7hN>
.
|
I am having the same problem. vscode: 1.30.1 |
It's hard to diagnose this without anymore information. Which generator are you using? What happens if you attempt to use the target from the command line? To the extent possible, it would be helpful to try to isolate this to either a CMake config issue or a bug in the extension.
|
The generator is ninja, is that always the default generator in cmake-tools? Because I think I did not select ninja anywhere.
and
both work in the build directory. |
Same problem here. With ninja on Windows. |
I had a quick look and it looks like the 'install' target is never added to the list of available targets. My assumption is that the behavior of the cmake-server changed between versions where old versions would advertise the install target and newer versions don't (I tested with 3.13). I can think of two ways to fix this:
Option 1 would be easier to implement, Option 2 would be cleaner. |
I looked at what CMake server 3.13 reports in the 'codemodel' reply, it seems it does not report any meta-targets like 'install' or 'clean'. Here is the reply: {
"configurations": [
{
"name": "RelWithDebInfo",
"projects": [
{
"buildDirectory": "/home/local/test/build",
"hasInstallRule": false,
"minimumCMakeVersion": "3.13",
"name": "test",
"sourceDirectory": "/home/local/test",
"targets": [
{
"artifacts": [
"/home/local/test/build/test"
],
"buildDirectory": "/home/local/test/build",
"fileGroups": [
{
"compileFlags": "-O2 -g -DNDEBUG ",
"includePath": [
{
"isSystem": true,
"path": "/home/local/test/lib0/build/install/include"
}
],
"isGenerated": false,
"language": "CXX",
"sources": [
"test.cpp"
]
}
],
"fullName": "test",
"isGeneratorProvided": false,
"linkLanguageFlags": "-O2 -g -DNDEBUG",
"linkLibraries": "../lib0/build/install/lib/liblib0.a",
"linkerLanguage": "CXX",
"name": "test",
"sourceDirectory": "/home/local/test",
"type": "EXECUTABLE"
}
]
}
]
}
],
"cookie": "",
"inReplyTo": "codemodel",
"type": "reply"
} |
Another test showed that installable targets have a 'hasInstallRule' field. Would it make sense to add the install target whenever there is at least one installable target? Here is another test codemodel: {
"configurations": [
{
"name": "Debug",
"projects": [
{
"buildDirectory": "/home/local/test/lib0/build",
"hasInstallRule": true,
"minimumCMakeVersion": "3.13",
"name": "lib0",
"sourceDirectory": "/home/local/test/lib0",
"targets": [
{
"artifacts": [
"/home/local/test/lib0/build/liblib0d.a"
],
"buildDirectory": "/home/local/test/lib0/build",
"fileGroups": [
{
"isGenerated": false,
"sources": [
"lib0.h"
]
},
{
"compileFlags": "-g ",
"includePath": [
{
"path": "/home/local/test/lib0"
}
],
"isGenerated": false,
"language": "CXX",
"sources": [
"lib0.cpp"
]
}
],
"fullName": "liblib0d.a",
"hasInstallRule": true,
"installPaths": [
"/home/local/test/lib0/build/install/lib"
],
"isGeneratorProvided": false,
"linkerLanguage": "CXX",
"name": "lib0",
"sourceDirectory": "/home/local/test/lib0",
"type": "STATIC_LIBRARY"
}
]
}
]
}
],
"cookie": "",
"inReplyTo": "codemodel",
"type": "reply"
} |
Brief Issue Summary
Target "install" can no longer be selected from the bottom toolbar; only "all" is available.
Expected:
One should be able to select target "install" the same way as target "all".
The text was updated successfully, but these errors were encountered: