Giter Site home page Giter Site logo

go2sh / cmake-integration-vscode Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 11.0 2.4 MB

CMake Server Interface for VSCode.

Home Page: https://go2sh.github.io/cmake-integration-vscode/

License: Other

TypeScript 99.11% JavaScript 0.54% Shell 0.35%
cmake cmake-server extension vscode

cmake-integration-vscode's People

Contributors

dependabot[bot] avatar go2sh avatar mar04 avatar reederphill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cmake-integration-vscode's Issues

Many include folders not found.

Thank you for creating this extension, it's quite helpful in configuring complex CMake workspaces.

ROS/catkin use CMake under the hood. Maybe it's something about the structure of the CMakeLists that makes it hard to find some includes.

3 examples where the includes weren't added to the include directories:

  1. Maybe it's the comment? Or maybe the macro expansion (quite common with catkin):
include_directories(
    include
    src
    # ${HEADERS}
    ${catkin_INCLUDE_DIRS}
)
  1. Here I can only blame the macro expansion, otherwise it seems straightforward
include_directories(
    inc
    ${catkin_INCLUDE_DIRS}
)
  1. I guess target_include_directories may be a bit more of an edge case than the previous two:
target_include_directories(stubbing
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/inc
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/
)

None of the include directories here are added to the path. I can only guess that this is a problem parsing the CMakeLists.txt.

Discussion: CTest integration or external API?

I saw that the roadmap has CTest integration on it and I was wondering what would be the best route to take in terms of UX. CMake Tools had this capability built-in, but I was wondering if it would be better to wire it in to a "3rd" partry extension, namely Test Explorer UI.

It has a dedicated UI for presenting tests from various frameworks, which is nice because it would feel familiar whether I'm using CTest, or another supported test framework (the list is LONG), plus it would declutter CMake Integrations own UI. It shouldn't be that hard to teach it another framework, as it has a stub project for teaching it another back-end. Also, mix'n'match of test frameworks in the same project would be a breeze, especially in multi-root contexts.

I was even thinking of making it my summer toy project to try to teach it CTest (I've never written a single line of TypeScript in my life, not to mention VS Code extension, so the success probability is extremely low). Should someone want to beat me to it, please comment here.

What do you think? Would you like if CTest had it's own dedicated UI via another extension?

Feature Request: Select Toolchain and Output Directory

Hey there,

I am often cross-compiling projects by the cmake option
-DCMAKE_TOOLCHAIN_FILE=../../somefolder/toolchain_raspberry.cmake.

I am therefore building my project into a directory called ./build/arm_cross instead of ./build.

It would be great if you could offer a fourth option in the status-bar, to select the toolchain file (which you could define in the settings.json in beforehand), somehow like that:

"cmake": {
    "generator" : "Unix Makefiles",
    "toolchains" : {
        "auto": {
            "build_dir": "${workspaceRoot}/build/x86_64"
        },
        "arm": {
            "file": "${workspaceRoot}/toolchain_raspberry.cmake"
            "build_dir": "${workspaceRoot}/build/arm_cross"
        }
    }
}

Again: Thank you for your hard work! I really enjoy the easiness of your extension 😁

Unable to build project

I have VS Code 1.35.0 and CMake Integration 0.4.1, running on Windows 10.

I have created a workspace and added to it a folder containing:

  • CMakeLists.txt
  • CMakeSettings.json

Hitting F7 does nothing. Nothing is reported by the extension in the status bar or in the output window. I guess I have omitted some basic step. Please will you suggest what I need to do to make CMake work with this project?

On screen build button?

Is F7 the only way to start a build?
Ideally I would like to start a build via the status bar.

GCC problem matcher does not recognize fatal errors

If we include a header file which itself also includes another header file which does not exist, gcc will return a fatal error which is not detected by the gcc problem matcher, hence no problem is shown in the tab.

[1/2] Building CXX object CMakeFiles/test.dir/main.cpp.o
FAILED: CMakeFiles/test.dir/main.cpp.o 
/usr/bin/c++    -g -MD -MT CMakeFiles/test.dir/main.cpp.o -MF CMakeFiles/test.dir/main.cpp.o.d -o CMakeFiles/test.dir/main.cpp.o -c ../main.cpp
In file included from ../main.cpp:1:
../test.h:2:10: fatal error: nonexisting.h: No such file or directory
    2 | #include "nonexisting.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Simple code to reproduce:

#include "test.h"

int main() {
  return 0;
}

content of test.h:

#include "nonexisting.h"

the reconfigure on change can not always working

hi,I met some problems with the extension

cmake version: 3.10.2

extension version: 0.61

I have selected the "Reconfigure on change" and "Auto save" options, but when I change the CMakeLists.txt file from right to error, the extension will reconfigure. In turn,it does not work

for example

cmake_minimum_required(VERSION 3.10.2)

project(Learning)

set(CMAKE_CXX_STANDARD 14)

add_executable(Learning src/main.cpp)

I remove "src" that in CMakeLists.txt, it will create a red underline below fouth row. when I add the "src" at same position, it has no effect. I must using the command of "configure current project" if i want to reconfigure the project.

Am I clear?

Build stops after ~70 files compiled

Ubuntu Linux 16.04
VSCode 1.37.1
CMake Integration 0.6.3

When triggering a build with multiple work spaces, the build will stop after compiling around 70 files. I will re-start the build via the GUI button or F7 but the build will again stop after 70 files are compiled.

We have a large environment spreading across 6 architectures and building 5000+ objects per architecture.

Unfortunately I can not provide logs.

Doesn't find default_target in Makefile

This extension seems to be unable to find the default target. My CMake generated Makefile begins like this:

# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.10

# Default target executed when no arguments are given to make.
default_target: all

.PHONY : default_target

However the default target (all) is not available in the status bar menu of the extension.

No contributing.md

There's no contributing.md documenting how to get started in developing on this project. This makes it hard for potential contributors to see where to start.

Problem matcher not working correctly for older gcc versions

I am facing following issue with older GCC versions (in my case we are tied to an ARM cross compiler 4.7.3 unfortunately).
It stops the output parsing after a certain line.

This is the output when I invoke the build from command line:
FAILED: CMakeFiles/test.dir/main.cpp.o /home/thomasm4/Downloads/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin/arm-linux-gnueabihf-g++ -g -MD -MT CMakeFiles/test.dir/main.cpp.o -MF CMakeFiles/test.dir/main.cpp.o.d -o CMakeFiles/test.dir/main.cpp.o -c ../main.cpp In file included from ../main.cpp:1:0: ../one.h:1:17: fatal error: two.h: No such file or directory compilation terminated.

While this is the output from the VS Code output pane:
[1/2] Building CXX object CMakeFiles/test.dir/main.cpp.o FAILED: CMakeFiles/test.dir/main.cpp.o /home/thomasm4/Downloads/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin/arm-linux-gnueabihf-g++ -g -MD -MT CMakeFiles/test.dir/main.cpp.o -MF CMakeFiles/test.dir/main.cpp.o.d -o CMakeFiles/test.dir/main.cpp.o -c ../main.cpp In file included from ../main.cpp:1:0:

It never reaches the fatal error message, and therefore it is not shown in the problems pane of VS Code. Also, any other error / warning after that line is not parsed.

Plain simple code for reproduction using toolchain from https://releases.linaro.org/archive/13.01/components/toolchain/binaries/:

sample.zip

Win10 and VS2019

VS 2019 does not appear as an option for generation.

My CMake says it does, and it works great from command line

There seems to be more than this going on. With only this extension and the MS C++ extension running there are no options for cmake. Selecting CMake: Select CMake config brings up an empty selector. CMake: Restart CMake does nothing at all.

0.7.0 breaks configuration

Hi,

i don't know what happend but i tried today a complete fresh reconfiguration of my projects by deleting the build folders. With 0.7.0 i'm now unable to configure my projects. The output is just

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_C_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_CXX_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_ASM_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "C:/src/xxx/build/CMakeFiles/CMakeOutput.log".
See also "C:/src/xxx/build/CMakeFiles/CMakeError.log".
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_C_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_CXX_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:8 (project):
  No CMAKE_ASM_COMPILER could be found.
  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "C:/src/xxx/build/CMakeFiles/CMakeOutput.log".
See also "C:/src/xxx/build/CMakeFiles/CMakeError.log".

Since the log is put into the source directory it seems that the configuration process does not recognize the cmake_configuration.json where i defined my toolchain file and the build directory

Or can it be something else ? I try to downgrade for now

Version string not found in output

When trying to start using cmake-integration, I get the error:

Failed to start CMake Client(<reponame>): Version string not found in output.

I could not find this in the documentation and am unsure how to check what is actually wrong with the setup. I am trying to use cmake-integration for remote compiling.

I don't see any special setup I had to do with cmake-tools, which I am attempting to switch away from for the multiroot capability.

Explain how this extension compares to cmake-tools

Hi,

I saw this closed issue and while informative, it is not complete or updated (I am sure your extension as well as microsoft's cmake-tools have been updated since that post). I propose that a section be added to this repo's readme file with a brief feature comparison (perhaps a table listing feature parity of the two extensions) and recommendations as to why a user would choose one over another.

Thanks

Command line arguments

Is there a setting to add a command line switch to the cmake command?

-Wno-dev is what I want to add, but it seems that it would be useful for other stuff...

(I probably missed it when searching, but I did try)

Some files fail to get an intellisense client

Hi,

i just want to ask if someone else experiences this problem. For some project files in my workspace i get this error message:

Failed to create IntelliSense client. Can't create intellisense client for c:/xxx/xxx/xxx/xxx/xxx.cpp

The files with this error message from the C/C++ extension have all squiggly line under the include files.
For most of the files in the project the intellisense works fine and i can't see a difference why other files work and a few not. I have one VSCode workspace with a few CMake project all in single folders added to the workspace.
I am on Win10 Prof 64bit latest updates with VSCode latest and CMake-Integration 0.3.2

Thanks for any help in advance

Tests aren't configured in project

Cloning the project I can see that there seem to be tests, but they're not configured for running the test suite. Also you can't F5 debug the extension currently. This makes it harder to contribute.

grafik

Just stopped working

I had been using this for a while now with great success, but somewhere along the line it just stopped working. I uninstalled and reinstalled, but no love.

I suspect some recent update may be interfering.

toolchain option not working properly

Hi,

The last update to 0.7.0 ignores the toolchain-setting, where I usually give a specific toolchain file to my cmake configurations. In 0.6.5 it works fine, so probably there are some changes there I'm not aware of.

My setup: connect to a remote machine that hosts the projects code and does (cross-) builds. The project contains several CMAKE toolchain files depending on the target platform. My configuration looks like (multiple times for different platforms):
{
"name": "COMi.MX Debug",
"buildType": "Debug",
"buildDirectory": "${workspaceFolder}/build/comimx/${buildType}",
"toolchain": "${workspaceFolder}/cmake/poky_toolchain-arm-imx.cmake",
"cacheEntries": [
{
"name": "RV_RTP_FPGA_COMIMX",
"value": "1",
"type": "BOOL"
},
{
"name": "RV_PTP",
"value": "linuxptp",
"type": "STRING"
}
]
},

While in 0.6.5 the toolchain file is properly found and used (settings für compiler, libraries and paths), in 0.7.0 this doesn't work anymore. Instead it tries to use the defaults (i.e. /usr/bin/cc instead of (crosstoolchain/architecture/cc). Do I have to update the config somewhere?

Build directory creation fails with EEXIST for new workspaces

I'm using remote SSH.

  1. Create and open a new folder.
  2. Create a simple CMake project (e.g. executable with one file)
  3. F1→"CMake: Configure workspace"
  4. A build directory is created in the workspace and an error appears: Failed to configure project(<project_name>): EEXIST: file already exists, mkdir '<workspace>/build'

Running the configure a second time or deleting the build folder and then configuring will successfully configure the project.

Environment variables in configuration seetings seem not to work

Before i say anything thanks so much for your work. The multi root workspace is really a nice and the extension seems to work fine for me for know. However it seems to that when i define a cache variable with "cmake.cacheEntries" in the json file and use an evironment varibale in the definitions for path like "${env:Variable}\path\to\something" ${env:Variable} is not resolved in the CMakeCache.txt

It would be great if this would work

Build output stops after ~27000 lines

When building a target that produces a large amount of text in the output panel, the build stops after ~27000 lines have been printed. It appears that the build process is terminated, though that is unclear.

Tested on Ubuntu 18.04 using standard Unix tools (make, gcc, etc).

You can test it with a CMakeLists.txt file that looks like this:

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(test)

foreach(x RANGE 0 100000)
  message("x=${x}")
endforeach()

After the project is loaded, save the CMakeLists.txt file to invalidate it, then build the current target. The output should look like this:

x=0
x=1
...
x=27098
x=27099

0.7.0 update notice always shown

Every time I open a CMake workspace I get the notification regarding 0.7.0 upgrade. 0.7.0 is the first version I've installed.

Failed to restart CMake: connect ECONNREFUSED /tmp/projectname-cmake.sock

Hi there!
Thank you for your Extension, looks really great at a first glance.
Unfortunately I am not able to use it yet 😞

When I try to clean the project, the following message appears:
Failed to restart CMake: connect ECONNREFUSED /tmp/ff1_selfcheck-3044-cmake.sock

Furthermore hitting F7 does nothing.

Additional Context

flood@flood-r3 ~> cmake --version
cmake version 3.13.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

CMakeLists.txt

cmake_minimum_required( VERSION 3.12 )

# Define the compiler locations
set (CMAKE_C_COMPILER   gcc)
set (CMAKE_CXX_COMPILER g++)

# projectname
project (ff1_selfcheck)

# directories where to search for header files
include_directories(src)
include_directories(inc)

# cpp files to compile
set (srcs BrickChecker.cpp DeviceFileChecker.cpp ErrorDisplay_7seg.cpp ErrorDisplay.cpp ErrorDisplay_LEDButton.cpp main.cpp NetworkChecker.cpp)
list (TRANSFORM srcs PREPEND "src/") # cmake >= 3.12

# executable to create
add_executable (${PROJECT_NAME} ${srcs})

# link libraries
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libbrick.a)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libaf3pihal.a)
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libyaml-cpp.a)
target_link_libraries(${PROJECT_NAME} pthread)

add_definitions(-Wall -std=c++11 -g)

settings.json

{
        "files.associations": {
            "iostream": "cpp",
            "cstdint": "cpp",
            "ostream": "cpp",
            "vector": "cpp",
            "thread": "cpp",
            "cctype": "cpp",
            "clocale": "cpp",
            "cmath": "cpp",
            "cstdarg": "cpp",
            "cstddef": "cpp",
            "cstdio": "cpp",
            "cstdlib": "cpp",
            "cstring": "cpp",
            "ctime": "cpp",
            "cwchar": "cpp",
            "cwctype": "cpp",
            "array": "cpp",
            "atomic": "cpp",
            "*.tcc": "cpp",
            "chrono": "cpp",
            "list": "cpp",
            "unordered_map": "cpp",
            "exception": "cpp",
            "fstream": "cpp",
            "functional": "cpp",
            "initializer_list": "cpp",
            "iomanip": "cpp",
            "iosfwd": "cpp",
            "istream": "cpp",
            "limits": "cpp",
            "memory": "cpp",
            "numeric": "cpp",
            "optional": "cpp",
            "ratio": "cpp",
            "sstream": "cpp",
            "stdexcept": "cpp",
            "streambuf": "cpp",
            "string_view": "cpp",
            "system_error": "cpp",
            "type_traits": "cpp",
            "tuple": "cpp",
            "typeinfo": "cpp",
            "utility": "cpp",
            "algorithm": "cpp",
            "string": "cpp"
        },
        "C_Cpp.loggingLevel": "Debug",
        "C_Cpp.intelliSenseEngineFallback": "Enabled",
        "cmake.generator": "Unix Makefiles"
        }

Log (Extension Host)

[2019-01-13 17:07:01.576] [exthost] [info] extension host started
[2019-01-13 17:07:01.800] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"activationEvent":"*"}
[2019-01-13 17:07:01.800] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/debug-auto-launch/dist/extension
[2019-01-13 17:07:01.830] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"}
[2019-01-13 17:07:01.830] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/emmet/dist/extension
[2019-01-13 17:07:01.918] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"}
[2019-01-13 17:07:01.918] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/git/dist/main
[2019-01-13 17:07:02.276] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"}
[2019-01-13 17:07:02.276] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/merge-conflict/dist/extension
[2019-01-13 17:07:02.296] [exthost] [info] ExtensionService#_doActivateExtension SanaAjani.taskrunnercode {"startup":true,"activationEvent":"*"}
[2019-01-13 17:07:02.296] [exthost] [info] ExtensionService#loadCommonJSModule /home/flood/.vscode-oss/extensions/sanaajani.taskrunnercode-0.3.0/out/extension
[2019-01-13 17:07:02.304] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing {"startup":false,"activationEvent":"onLanguage:jsonc"}
[2019-01-13 17:07:02.304] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/configuration-editing/dist/extension
[2019-01-13 17:07:02.331] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features {"startup":false,"activationEvent":"onLanguage:jsonc"}
[2019-01-13 17:07:02.331] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/json-language-features/client/dist/jsonMain
[2019-01-13 17:07:02.545] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features {"startup":false,"activationEvent":"onLanguage:jsonc"}
[2019-01-13 17:07:02.545] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/typescript-language-features/dist/extension
[2019-01-13 17:07:02.863] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {"startup":true,"activationEvent":"workspaceContains:/.vscode/c_cpp_properties.json"}
[2019-01-13 17:07:02.863] [exthost] [info] ExtensionService#loadCommonJSModule /home/flood/.vscode-oss/extensions/ms-vscode.cpptools-0.20.1/out/src/main
[2019-01-13 17:07:04.398] [exthost] [info] ExtensionService#_doActivateExtension vscode.grunt {"startup":false,"activationEvent":"onCommand:workbench.action.tasks.runTask"}
[2019-01-13 17:07:04.398] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/grunt/dist/main
[2019-01-13 17:07:04.419] [exthost] [info] ExtensionService#_doActivateExtension vscode.gulp {"startup":false,"activationEvent":"onCommand:workbench.action.tasks.runTask"}
[2019-01-13 17:07:04.419] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/gulp/dist/main
[2019-01-13 17:07:04.481] [exthost] [info] ExtensionService#_doActivateExtension vscode.jake {"startup":false,"activationEvent":"onCommand:workbench.action.tasks.runTask"}
[2019-01-13 17:07:04.481] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/jake/dist/main
[2019-01-13 17:07:04.524] [exthost] [info] ExtensionService#_doActivateExtension vscode.npm {"startup":false,"activationEvent":"onCommand:workbench.action.tasks.runTask"}
[2019-01-13 17:07:04.524] [exthost] [info] ExtensionService#loadCommonJSModule /usr/lib/code/extensions/npm/dist/main
[2019-01-13 17:07:05.329] [exthost] [info] ExtensionService#_doActivateExtension go2sh.cmake-integration-vscode {"startup":true,"activationEvent":"workspaceContains:**/CMakeLists.txt"}
[2019-01-13 17:07:05.329] [exthost] [info] ExtensionService#loadCommonJSModule /home/flood/.vscode-oss/extensions/go2sh.cmake-integration-vscode-0.1.3/out/src/extension
[2019-01-13 17:07:05.651] [exthost] [info] eager extensions activated
flood@flood-r3 ~> ps -aux | grep cmake
flood     1470  7.1  4.4 1243072 174048 ?      Sl   16:24   3:35 /usr/lib/chromium/chromium --ppapi-flash-version=32.0.0.101 --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so https://github.com/go2sh/cmake-integration-vscode
flood     4438  0.1  0.3  54536 13652 ?        S    17:07   0:00 cmake -E server --pipe=/tmp/ff1_selfcheck-4314-cmake.sock --experimental
flood     5057  0.0  0.0   8188   880 pts/0    S+   17:14   0:00 grep --color=auto cmake

Extra generator seems not to work

I recognized that the extra generator is not working. I recently wanted to double check something in eclipse but the .project and .cproject are missing in the build folder.
I have configured Eclipse CDT4 as an extra generator. I am sure i saw the files already once but since i setup everything new with version 0.4.1 the eclipse files seem not to be generated

Feature request / Discussion: Quick start template

My problem

One of the most vexing things about CMake Tools and the CMake integration of Big Brother VS as well is that it takes too much time to just quickly get a text editor where I can type code and compile. It's a shame really, that the fastest way to get a tecbox for code and start writing is still godbolt. Could we get a little closer with VS Code?

Why?

There is no capability to customize the quick-start template. In Big Brother VS there is the project selection dialog which creates a baked project with a CMakeLists.txt that still requires tweaks (change /W4, /permissive-, etc.) Same with the Quick Start command of CMake Tools. (I tend to use THIS snippet as my jump-start) It would be awesome, if there were a way to customize the layout of the project, the stub of the CMakeLists.txt file it creates and perhaps even the CMakeCache.txt file so compilers need not be detected, as they change infrequently while ABI detection takes quite some time.

Solution?

Do you see value in being able to somehow provide the extension with a user provided project as a jump-start template? Files that are either configure by a CMake script via configure_file or a TypeScript that replaces some occurences? Providing a clean CMakeCache.txt file to start out from, the result of a script

cmake_minimum_required(VERSION 3.11)

enable_language(C)
enable_language(CXX)

could significantly speed up initial configuration. (There are some parts of the cache that hold non-portable path entries.)

Ultimately there is no one size fits all, so I think this would make a useful addition, and everyone could come up with their desired jump-start template.

Feature Request: Stop Button

Can you please provide a stop button for the build? This can be as simple as toggling the build button to a stop button. In addition, IMO it would be more intuitive if the build button was disabled and 'F7' presses were ignored while a current build is in progress. Its confusing to see two or more builds launch in the same output window. At the end of the day, it is good having feedback that a build is in progress.

ExternalProject headers squigglies

My big project uses the ExternalProject CMake feature to download third-party libraries, e.g. spdlog, nlohmann json, imgui.

Unfortunately all of their headers show up with IntelliSense squigglies despite compiling fine and being able to open them with CTRL+clicking their names. System headers and the project's own includes seem to be parsed fine.

I tried to replicate this setup with a small example project, but it worked fine. The official CMake extension also groks this.

What are the steps I could take to try trace down this bug occurring with this project? E.g. is there a way to enable extra debug output from the extension?

Variable substitution does not work in all cases in cmake_configurations

I tried using variable substitution of environment variables in the cmake_configurations.json
For the buildDirectory i can use something like

cmake.buildDirectory:${env:BUILD_PATH}/project/${buildType}

But when i want to use an environment variable for the toolchain variable to specify a toolchain file it seems not to work. Would be great to use environment variables also for the toolchain file

Console output is not updatet when an external project is build

I have some CMake External_Projects in my setup. Currently the console output for the build process of the external project is not put out by the console in VSC. The output of the configuration process is still visible but the outputs of the build process are only seen when the build process is finished.
Just i minor thing but it would be great to have :)

Error when compiling configurationProvider.ts

Hi again,

i tried to compile the beta version of this extension to try it out. But when i run npm run compile i get the following error message

image

i compiling an extension for the first time but it seems the error is in the code ?

Is there a cmake install command?

I just stumbled upon it. It would be nice to be able to run the install target of a project if there are install() steps defined in it from the extension.
Is this already possible ? Would be a nice to have :)

Does CMake Integration replace CMake Tools?

Please provide some basic docs about CMake Integration vs the CMake Tools extension

  • Differences between CMake Integration and CMake Tools extensions
  • Some key points to use CMI instead of CMT

If the extensions are incompatible, then you should also remind the user to disable other extensions such as CMake Tools.

Feature Request: Add Include directories (of project and sub-projects) to IntelliSense

I know that this is maybe not as easy as one might think, but it would be really handsome to have the plugin automatically adding the necessary include directories to IntelliSense.

gcc does have a command that lists the the include-directories and defines:
g++ -Wp,-v -E -xc -dD -x c++ /dev/null - vscode-cpptools does use that output for IntelliSense.

Maybe there is something similar for CMake?

Looks like the server does have something like that, see here:
https://cmake.org/pipermail/cmake/2018-March/067291.html
https://cmake.org/cmake/help/v3.7/manual/cmake-server.7.html#type-codemodel (includePath)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.