rwols / cmakebuilder Goto Github PK
View Code? Open in Web Editor NEWConfigure, build and test a CMake project right from within Sublime Text 3.
License: MIT License
Configure, build and test a CMake project right from within Sublime Text 3.
License: MIT License
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.
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"])
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?
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.
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 ?
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 atD:/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 ?
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.
https://cmake.org/cmake/help/v3.8/manual/cmake-server.7.html
With cmake 3.15 there's a new file API. Utilize that to make the plugin simpler.
See #10.
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.
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?
refers to :
Line 54 in 591d107
If "-l" is passed, this plugin might catch the error of shell configuration file instead of the real command to be checked via shell.
~/.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
CMakeBuilder runs in an unhandled exception when settings are empty:
"settings": {"cmake":{}},
I know build directory is mandatory but it breaks the plug in.
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]
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?
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,
},
]
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. 👍
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.
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.
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.
CmakeBuilder: New Project...
and follow stepsCmakeBuilder: Configure
Build with: Defaut
<--- Everything is ok up to this point --->
Build With: Default - Run: hello
or Build With: Default - Run under GDB: hello
hello
from cmd line works as expectedtop
/ ps
do not show the program running in the backgroundTools
-> Build Results
-> Show Build Results
present this:[100%] Built target hello
[Finished in 61ms]
But no output from the program "Hello, world!
For Linux it says for generator
: "...on OSX"....
Most likely a copy-paste bug :)
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.