Giter Site home page Giter Site logo

cmakebuilder's People

Contributors

eugene-babichenko avatar paulfd avatar rwols avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cmakebuilder's Issues

load source file before running configure and make

Hi,
CMakeBuilder is a good ST package and its works well !
But I work on different computers with different environments. I create for each computer a source.me shell file containing all the env setting.
My problem is that I have to source the source.me shell file and create a new sublime_text session each time I want to switch computer because I can not tell to CMakeBuilder to load any shell file before running any commands.
Perhaps I missed something in the doc ? Is it possible to load any shell command before any CMakeBuilder commands ?
Best regards.
Bertrand M.

How do I configure parallel builds?

Hello, in old versions of the plugin, system_builds were generated with the -j {max_count_threads} flag, how to set the flag in the new version? Because now by default, the assembly goes in one thread. Which method is correct?

"env" : {"CMAKE_BUILD_PARALLEL_LEVEL": "8"}

or to class CmakeBuildCommand add:

cmd = [get_cmake_binary(), "--build", ".", "--config", config]
if build_target:
    cmd.extend(["--target", build_target])
cmd.extend(["-j8"])

CMakePresets.json support?

Hello, currently I'm using a project that contains a CMakePresets.json file.

I'm aware that you can create a build system that invokes cmake, but that demands that I manually write the build system with every preset in the file.

What I like about this package is that the "configure" will create the build system for us.

Is there a way to do that but using the json file?

CMakeBuilder does not detect installed cmake binary.

Clean install of SublimeText3 on MacOS Catalina (10.15.7 (19H15)).
Opened Project folder. e.g. The issue replicates on this repo. https://github.com/LearningByExample/ModernCppCI.git
Tools -> CMakeBuilder menu has only two options 'Diagnose (...)' and 'New Project'
Diagnosis results in the following output.
╒═══════════════╤═════════╤══════════════════╕
│ CHECK │ VALUE │ SUGGESTION/FIX │
╞═══════════════╪═════════╪══════════════════╡
│ cmake present │ 0 │ Install cmake │
╘═══════════════╧═════════╧══════════════════╛

The PATH env variable to include the location of the cmake executable is set in ~/.bashrc

Probably something simple that I am missing?

Thanks.

Latest version on PackageControl is obsolete

Hello CMakeBuilder enthusiasts !

I have noticed while using CMakeBuilder recently that the version installed with PackageControl is out-of-date, and leads to a situation where it is impossible to start CMake server

The error is shown as

Exception in thread Thread-1181:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "exec in C:\Program Files\Sublime Text 3\Packages\Default.sublime-package", line 141, in read_fileno
AttributeError: 'Server' object has no attribute 'encoding'

But looking at the latest code on this repo - as of 19/02/2018 - the Server class has this attribute.
However the Server class from the package on PackageControl doesn't.

I am not aware on how to update package in PackageControl but is it something you can do please ?

server.py-diff.txt

Cannot configure because of path interpretation on windows

Hello,

While trying CMakeBuilder v2, I encounter a problem during configuration.
It seems that my project path does not escape the '' character and then it misinterpret the path

The C compiler identification is MSVC 19.11.25507.1
The CXX compiler identification is MSVC 19.11.25507.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/HostX86/x86/cl.exe
CMake Error at D:/theblackunknown/Documents/GitHub/glog/build/CMakeFiles/CMakeTmp/CMakeLists.txt:11 (set):
Syntax error in cmake code at

D:/theblackunknown/Documents/GitHub/glog/build/CMakeFiles/CMakeTmp/CMakeLists.txt:11

when parsing string

D:\theblackunknown\Documents\GitHub\glog/build/CMakeFiles/CMakeTmp

Invalid character escape '\D'.

CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:37 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
CMakeLists.txt:11 (project)

Configuring incomplete, errors occurred!
See also "D:/theblackunknown/Documents/GitHub/glog/build/CMakeFiles/CMakeOutput.log".

It is something that can be handled by the sublime plugin ?

Allow specifying command line parameters "on the fly"

I have a project with many (many!) tests, defined via ctest. Running the command with ctrl+shift+b ctest will invoke CTets with no arguments and therefore run all of them.

usually what I would like to do is to run only a relevant subset of them via ctest -R my_test_pattern.

I know that I can specify cli parameters for ctest in the config, but having the opportunity to specify them directly when calling the build command somehow would simplify this significantly.

Implement server functionality

https://cmake.org/cmake/help/v3.8/manual/cmake-server.7.html

  • Add basic functionality
  • Add configure
  • Add codemodel
  • Add include directories
  • Add build command (this'll replace the old way of writing all build targets to the project file)
  • Make sure things work in Windows
  • Make sure things work in Linux
  • Look into bug where the quick-select panel stays visible after selecting the first item
  • Maybe wait for cmake devs to fix output directory bug? [WONTDO]
  • Rewrite "active target" logic. It should not be in the project file because it changes often.
  • Make sure no exceptions are thrown in unexpected places.
  • Make sure the new changes are transparent for older users.
  • Use TerminalView integration for building & running a target.
  • Make sure supershiftB presents all possible targets.
  • Make the "active target" show up in the status bar when sublime restarts from a hot exit.

Implement file API

With cmake 3.15 there's a new file API. Utilize that to make the plugin simpler.

See #10.

trailing commas in sublime-project file trigger crypitc error during configure: "Error while configuring project: env"

Hi! This sublime-project file will trigger this error during the configure step: "Error while configuring project: env"

The problem was fixed by removing the trailing comma from "CMAKE_TOOLCHAIN_FILE"

{
    "folders":
    [
        {
            "path": ".",
        }
    ],
    "settings":
    {
        "cmake":
        {
            "build_folder": "$folder/build",
            "generator": "Ninja",
            "command_line_overrides":
            {
                "CMAKE_TOOLCHAIN_FILE": "toolchain.cmake", // <- that trailing comma is the problem!
            },
        },
    },
}

Thanks,
Aaron.

Visible escape codes in build output and not working regex for c++ project

Hi,

I am trying to work with your plugin for generating a build system from CMake for a C++ project both at Linux and MacOS. While the configure and also the write out to the project file works, the subsequent build output fails: Although some part is colored, error messages have still ANSI escape codes visible (s. the attached pic). Furthermore, it is not possible to jump via F4 between error message. I also tried to replace the escape codes by using the plugin "SublimeANSI", however, without any success. Do you have any idea where I can tackle the problem?

image

Running shell with "-l" switch could make this plugin throw cmake capabilities error

issue

refers to :

cmd = ["/bin/bash", "-l", "-c", shell_cmd]

If "-l" is passed, this plugin might catch the error of shell configuration file instead of the real command to be checked via shell.

demo

~/.bash_profile

not-a-command 'arg1'

run the shell command with the "-l" option:

$ bash -l -c 'echo hello'
/Users/test/.bash_profile: line 1: not-a-command: command not found
hello
$ bash  -c 'echo hello'
hello

Screen Shot 2019-11-03 at 12 27 39 AM

empty settings compromise the plugin

CMakeBuilder runs in an unhandled exception when settings are empty:

"settings": {"cmake":{}},

I know build directory is mandatory but it breaks the plug in.

Can't select "Visual Studio 14 2015 Win64"

In my settings I select the compiler installed on my system:
"visual_studio_versions": [14]
But I can't select the Win64 version

This results in an error:
CMake Error: Error: generator : Visual Studio 14 2015
Does not match the generator used previously: Visual Studio 14 2015 Win64
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
[Finished in 0.2s with exit code 1]

ABILITY TO CREATE NEW C/C++ PROJECT WITH WIZARD LIKE BEFORE

please return all the options from the old tools menu especially the one to create new c/c++ project. I liked it and it was really useful and time saving. it was the main reason I was using this package!! - a wizard to create a c/c++ cmake project. we need this please!!

please get it back asap!!
alternatively, is there a way to stick to the older version?

make cmake profiles selectable

This is a really great tool for cmake projects!
Could you make for us to select a one profile between multiple cmake profiles such as the following example?

e.g.) It would be very useful if we can select 'cmake profile A' or 'B' in the command palette.

"cmake": [
    {
        "name": "cmake profile A"
        "build_folder": "$folder/build-A",
        "env": {
            "CC": "clang",
            "CXX": "clang++",
            "ENV_A": "AAA",
        },
        "command_line_overrides":
        {
            "CMAKE_BUILD_TYPE": "Debug",
            "CMAKE_EXPORT_COMPILE_COMMANDS": true,
        },
        "cmake_debug": true,
    },
    {
        "name": "cmake profile B"
        "build_folder": "$folder/build-B",
        "env": {
            "CC": "/opt/local/bin/arm-none-eabi-gcc",
            "CXX": "/opt/local/bin/arm-none-eabi-g++",
            "ENV_B": "BBB",
        },
        "command_line_overrides":
        {
            "CMAKE_BUILD_TYPE": "Debug",
            "CMAKE_EXPORT_COMPILE_COMMANDS": true,
            "CMAKE_TOOLCHAIN_FILE": "/opt/local/share/arm_toolchain.cmake",
        },
        "cmake_debug": true,
    },
]

Bug: progress indication missing

I'm using windows with the visual studio generator and the build seems good but the progress marks on the left are missing.

Thanks for your work. 👍

[suggestion] Option to disable cmake autoload

I sometimes find myself fixing a typo in our huge cmake project while building, causing CMakeBuilder to cancel my build at 99% :)

An option to disable that behaviour would be awesome.

More strict check on "build_folder" parameter

Can you check macros in "build_folder" before substitute them? I wasn't able to work on a project because of an untracked typo in ${project_path}. In fact, the macro with the typo was just skipped and CMakeBuilder tried to create /build folder in the root directory getting 'Permission denied' error.

Question: How to run project artifacts under the build system??

Maybe I am doing something wrong but I cannot figure out how to run the artifacts from within sublime. Could you please help??

Maybe adding a section about this in the README would help other users as well.

Steps to reproduce:

  1. Open Sublime
  2. Invoke CmakeBuilder: New Project... and follow steps
  3. Invoke CmakeBuilder: Configure
  4. Invoke Build with: Defaut
    WORKS as expected. Executable "hello" is generated.

<--- Everything is ok up to this point --->

  1. Invoke either Build With: Default - Run: hello or Build With: Default - Run under GDB: hello
    A text box labeled "Command Line Arguments" appears and regardless of my input nothing else happens.

What I have tried:

  • Running the output program hello from cmd line works as expected
  • I have tried to add a read input line at the end of the hello program to no avail.
  • top / ps do not show the program running in the background
  • Showing in menu Tools -> Build Results -> Show Build Results present this:
[100%] Built target hello
[Finished in 61ms]

But no output from the program "Hello, world!

Environment

  • Ubuntu 23.04
  • Sublime 4143
  • CMakeBuilder v2.1.0 installed from Package Control
  • cmake version 3.25.1
  • GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
  • g++ (Ubuntu 12.2.0-17ubuntu1) 12.2.0

allow using python venv

hello,

we need to run cmake and also the subsequent builds under a given python environment. is there any interest in supportin this use case? if so I could try my hands at a PR

Switching between debug and release

Hi,
I have used your package for a long time, thank you for the work done

I have had an issue, or question, torturing me all the way. Is there a way to switch between different multiple cmakebuilder's configurations for a user's project? For example, I have a Debug and a Release those must be configured differently, the first configuration has to be fed by -DCMAKE_BUILD_TYPE=Debug and the second with -DCMAKE_BUILD_TYPE=Release. Now I cannot specify different configurations for your package in one .sublime-project file, I have to create as many .sublime-project files as number of configurations, meanwhile for sublime text build_systems it is possible to switch among them (Tools -> Build Systems) when you're specifying them in one '.sublime-project' file

Thank you

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.