Git Product home page Git Product logo

atom-build-cmake's People

Contributors

dwarburt avatar hyjin avatar janosimas avatar jimjibone avatar kramerc avatar siegelaaron94 avatar zaucy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-build-cmake's Issues

Error: Cannot read CMakeSettings.json

The newest version always throws an error and does not show any build configurations, whether there is a CMakeSettings.json file or not. From time to time, e.g. after reinstalling, it works for one run, but then returns to throwing this error.

Custom Cmake args need to be split

When I needed to add more than one custom Cmake args, I put them in the settings delimited by spaces. However, instead of each arg getting passed correctly on it's own, Cmake took all of the additional args to be an extended value of the first.

Post-command / "actually" build

Is/will it possible to run the actual build command after making the CMake files? I'd suggest a custom command rather than a checkbox, so the ability to e.g. execute a different build system, or run a self-check executable is possible.

XCode Targets

More of a question rather than a bug; I'm trying to build using build-cmake on OSX with XCode to create iOS projects. It keeps coming up with "Cannot extract targets for generator Xcode". Not sure if this is a CMake settings problem, or an XCode environment problem, or something else. Can someone point me in the correct direction please?

Can't edit cache

When I try to run the edit_cache target on my projects it systematically fails. If I run the same command (cmake --build <path-to-project>/build --target edit_cache) from a terminal, it works as expected.

Here is the error showing up in Atom:

Atom: 1.20.1 x64
Electron: 1.6.11
OS: linux 4.11.12-1-rt13-rt
Thrown From: build package 0.69.0

Stack Trace

Uncaught TypeError: Cannot set property '1' of undefined

At /home/idhuser/.atom/packages/build/node_modules/term.js/src/term.js:1939

TypeError: Cannot set property '1' of undefined
    at Terminal.write (/packages/build/node_modules/term.js/src/term.js:1939:55)
    at Socket.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Commands

 65x -2:19.7.0 core:move-down (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:17.2.0 core:move-left (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:17 core:move-right (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.9.0 core:move-up (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.8.0 core:move-left (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.6.0 core:move-right (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.6.0 core:move-down (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.4.0 core:move-left (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:16.3.0 core:move-down (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -2:11.7.0 build:stop (div.terminal)
     -2:08.7.0 platformio-ide-terminal:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -1:11.5.0 editor:copy-path (div.terminal)
     -0:57.7.0 build:select-active-target (input.hidden-input)
     -0:56 core:confirm (input.hidden-input)
     -0:25.6.0 build:select-active-target (input.hidden-input)
     -0:22.3.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-html-preview 0.2.2 
atom-latex 0.8.2 
atom-typescript 11.0.9 
autocomplete-clang 0.11.3 
autocomplete-cmake 0.3.1 
autocomplete-python 1.10.3 
build 0.69.0 
build-cmake 0.10.2 
build-make 0.13.0 
busy 0.7.0 
busy-signal 1.4.3 
dash 1.7.1 
debug 0.0.1 
doxygen-snippets 0.1.1 
git-plus 7.9.3 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
ink 0.7.6 
intentions 1.1.5 
julia-client 0.6.3 
language-cmake 0.3.0 
language-julia 0.12.0 
language-latex 1.1.1 
language-lua 0.9.11 
language-rust 0.4.12 
latex 0.48.0 
linter 2.2.0 
linter-clang 4.1.2 
linter-lua 1.0.4 
linter-rust 0.8.0 
linter-spell-latex 0.10.0 
linter-ui-default 1.6.10 
local-settings 0.4.1 
MagicPython 1.0.12 
maximize-panes 0.2.0 
platformio-ide-terminal 2.7.0 
project-manager 3.3.5 
python-indent 1.1.1 
python-jedi 0.3.8 
python-snippets 1.9.0 
python-tools 0.6.9 
racer 0.20.0 
Remote-FTP 1.1.4 
rust-api-docs-helper 0.5.1 
rustfmt 0.1.3 
script 3.16.0 
split-diff 1.5.1 
todo-show 2.1.0 
tool-bar 1.1.0 
uber-juno 0.1.2 

being able specify toolchain

Hi,
when generating makefiles, is it possible to specify options like a toolchain ?
Each of my cmake projects needs a toolchain for cross compiling.
Regards.
Steph

Generator setting vanishes

I still haven't figured out what triggers this behaviour, but at least once a week my generator setting vanishes from .atom/config.json.

"build-cmake":
    generator: "Ninja"

The settings interface cmd+, shows the generator option as blank when this happens but it actually defaults to Makefile.

Has anyone else experienced this behaviour?

I am on macOS 10.12.4, Atom 1.16.0-x64 and build-cmake 0.9.1.

Uncaught Error: watch ENOSPC

[Enter steps to reproduce below:]

Just started atom, don't know why it happened.
The plugin is working fine.

Atom Version: 1.6.0
System: Ubuntu 14.04.4
Thrown From: build-cmake package, v0.3.1

Stack Trace

Uncaught Error: watch ENOSPC

At events.js:141

Error: watch ENOSPC
  at exports._errnoException (util.js:837:11)
  at FSWatcher.start (fs.js:1247:11)
  at Object.fs.watch (fs.js:1273:11)
  at createFsWatchInstance (/home/jsimas/.atom/packages/build-cmake/node_modules/chokidar/lib/nodefs-handler.js:37:15)
  at setFsWatchListener (/home/jsimas/.atom/packages/build-cmake/node_modules/chokidar/lib/nodefs-handler.js:80:15)
  at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/jsimas/.atom/packages/build-cmake/node_modules/chokidar/lib/nodefs-handler.js:228:14)
  at FSWatcher.NodeFsHandler._handleFile (/home/jsimas/.atom/packages/build-cmake/node_modules/chokidar/lib/nodefs-handler.js:255:21)
  at FSWatcher.<anonymous> (/home/jsimas/.atom/packages/build-cmake/node_modules/chokidar/lib/nodefs-handler.js:473:21)
  at FSReqWrap.oncomplete (fs.js:82:15)

Commands

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "disabledPackages": [
      "language-thrift",
      "atom-debugger",
      "linter",
      "linter-clang",
      "you-complete-me",
      "language-ocaml",
      "language-ini",
      "language-babel",
      "haskell-grammar",
      "switch-header-source"
    ],
    "openEmptyEditorOnStart": false
  }
}

Installed Packages

# User
build, v0.57.0
build-cmake, v0.3.1
build-make, v0.8.0
file-type-icons, v1.0.1
highlight-selected, v0.11.2
language-cmake, v0.1.4
language-cpp14, v0.6.0
language-qtpro, v0.6.0
nuclide, v0.125.0
open-recent, v5.0.0
selection-highlight, v0.1.4
terminal-plus, v0.14.5
tool-bar, v0.4.0

# Dev
No dev packages

Running make creates another CMakeFiles directory

I'm using build-cmake with build and build-make.

If I build "generate", CMakeFiles is put in ../projectname-build/. This doesn't actually run make.

If I build "GNU make: default (no target)", it puts a copy of CMakeFiles in ..
Is this the intended behaviour or am I doing something wrong?

Thank you

I'm using Atom 1.8.0, build 0.64.0, build-make 0.10.0, build-cmake 0.5.3 on ArchLinux.

Update README

The README is very out of date and needs to include documentation for $PROJECT_DIR, $TMPDIR, and $PROJECT_DIRNAME.

Build location not working

The tag PROJECT_DIR is not working,
building in a folder with the same name as the source dir but with '-build' after is doesn't work.

I was expecting to have I look on it but couldn't find the time.

Uncaught TypeError: Cannot read property 'lastChild' of null

Error message always shows at startup

Atom Version: 1.12.7
Electron Version: 1.3.13
System: "Fedora release
Thrown From: build-cmake package, v0.8.1

Stack Trace

Uncaught TypeError: Cannot read property 'lastChild' of null

At /home/alex/.atom/packages/build-cmake/lib/cmake.js:185

TypeError: Cannot read property 'lastChild' of null
    at CMakeBuildProvider.setGeneratorSelectorError (/home/alex/.atom/packages/build-cmake/lib/cmake.js:185:28)
    at /home/alex/.atom/packages/build-cmake/lib/cmake.js:262:30
    at ChildProcess.exithandler (child_process.js:209:7)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

Config

{
  "core": {
    "telemetryConsent": "limited"
  }
}

Installed Packages

# User
build, v0.67.0 (active)
build-cargo, v1.2.0 (active)
build-cmake, v0.8.1 (active)
build-make, v0.13.0 (active)
busy, v0.7.0 (active)
language-blade, v0.26.2 (active)
language-cmake, v0.2.0 (active)
language-cpp14, v0.6.2 (active)
language-rust, v0.4.8 (active)
language-vue, v0.21.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (active)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (active)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.2 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages

Can't figure out what I'm doing wrong.

I installed Build and Build-CMake but I can't build anything.

Here is my cmake file

cmake_minimum_required(VERSION 3.0)

set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

project(example)

add_executable(
    sample
    header.hpp
    main.cpp
)

Its in the same directory as the source files. The Build-CMake package is configured to look for CMake files in the root directory. I press F9 and it says "No configuration to build this project exists."

Any help appreciated. Thanks!

Support CMake server Mode

In version 3.7 CMake added support for a server mode that uses a JSON protocol to return detailed information about the CMake project.

default generator empty

Hi.

Just tried to use the cmake generator on osx catalina, and it fails by default because it seems to have an empty default generator. I.e. cmake is called with -G, but no generator name after it, which makes it fail of course

Build does not work in Fedora 25

When invoking the generate target from a CMake project, there appears a lot of BASH_FUNC_module and BASH_FUNC_scl errors (exactly same errors as here and here), whenever atom is launched from /usr/share/atom/atom (from GNOME Panel). However, build works when atom is launched from /usr/bin/atom (when launched from a terminal).

It seems other packages are having similar issues. At first I thought it had to do with Wayland not processing .bash_profile/.bashrc, however that seems to have been fixed already. Also, I tried triggering a build from a GNOME Xorg session and still found the same issue.

My atom version is 1.17 and I'm running Fedora 25.

Nothing appears

Hi, I installed on Atom 1.17.2

The plugin is successfully installed (it is shown in Packages) but there is no target shown at the bottom left.

Run target

I'm not sure if it would be in the scope of your tool but a "run target" would be great!

No function

I installed the addon, but nothing happened. No StatusBar Buttons/Icons are visible nor i could find a new menu entry for cmake. Pressing F5 and F7 also had no action. Did i miss something?

Custom CMake Arguments - no way to pass argument containing space

Hi
I'm trying to set CMake generator to MinGW Makefiles, but CMake receives only MinGW.
Probably this is related to feature automatically splitting arguments separated by spaces.
A lot of generators contains spaces in it's name, beside enclosing the name in apostrophes doesn't help.

I propose changing the Argument field to multi line, where each line contain another argument taken as a whole, no matter how many spaces white spaces are inside.

BTW why on Windows Visual Studio 15 is passed as a generator by default?

Ninja target extraction regression

See #25. The latest version only extracts ninja -t targets and should in addition use 'all' and ninja -t query all. My js-foo is not strong enough to fix it again.

No eligible build target

I create a build forlder in ${CMAKE_SOURCE_DIR}/build
and executed the cmake to generate tha config files.

when I try to run atom-build, I get: "No eligible build target"

Cannot read property 'message' of undefined

Ooops. Something went wrong in the cmake build provider.
Cannot read property 'message' of undefined
Hide Stack Trace
TypeError: Cannot read property 'message' of undefined
    at file:///C:/Users/Aidan/.atom/packages/build-cmake/lib/main.js:241:21
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Not really sure what to do from here. What more do I need to provide? I'm using the following to use WSL with this package: https://gist.github.com/Aidoboy/cc413e6d4728e6bc82affc945f0ba8fc

Retrieve targets for Ninja generator

I miss the feature that lists all the targets upon pressing ctrl+alt+t when I am using Ninja as generator. I tried to implement a similar feature in my local ~/.atom/packages/build-cmake/lib/cmake.js file but failed.

I simply created new functions

        createNinjaTarget(target_name) {
            return {
                atomCommandName : 'cmake:' + target_name,
                name : target_name,
                exec : this.executable,
                cwd : this.source_dir,
                args : ['--build', this.build_dir, '--target',target_name,'--'],
                errorMatch : compileErrorMatch.concat(generateErrorMatch),
                warningMatch : compileWarningMatch.concat(generateWarningMatch),
                sh : false
            };
        }

and

        ninjaTargets() {
            output = execSync(
              this.executable + ' --build ' + this.build_dir + ' --target help', { cwd: this.build_dir });
            return output.toString('utf8')
            .split(/[\r\n]{1,2}/)
            .filter(line => line.startsWith('...'))
            .map((line) => this.createNinjaTarget(line.replace('... ','').split(' ')[0]));
        }

and, finally, added the conditional for the generator at the end of the file like

                else if(generator.match('Ninja'))
                    return [ generateTarget ].concat(this.ninjaTargets());

Is there something missing? Is it at all possible to do with Ninja the same as with GNU Make?

On Ninja, `clean` target fails due to `-j4`

I am getting this error message

usage: ninja -t clean [options] [targets]

options:
  -g     also clean files marked as ninja generator output
clean: invalid option -- 'j'
  -r     interpret targets as a list of rules to clean instead

every time I try to run clean from the ctrl+alt+t menu inside Atom.

Doing so currently invokes

cmake --build ${PROJECT}/build --target clean -- -j4

Maybe, besides removing the parallelism option -j4 from the clean target directive, there is also a way to add a clean-cmake target by exploring the -g option shown above.

Bad RegEx in the supportedGenerators() function

Hi Aaron!

mac OS 10.15.7

%cmake --version
cmake version 3.20.2

%cmake --help | grep -A20 Generators

Generators

The following generators are available on this platform (* marks default):
* Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Ninja Multi-Config           = Generates build-<Config>.ninja files.
  Xcode                        = Generate Xcode project files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.


Now, the function 'supportedGenerators()' in ~/.atom/packages/build-cmake/lib/cmake.js parses cmake --help to get the list of generators. The RegEx for this is:
/\s{3}(.*)\s*=\sGenerates?(.*\.|.*\s*.*\.)(\s*Optional\s\[arch\]\scan\sbe\s(".*").)?/g.
This does not match * Unix Makefiles because of the star and hence the firs generator becomes an empty string (breaking the function 'configuration()' in ~/.atom/packages/build-cmake/lib/main.js due to the line generator: generators[0]).
There is an easy fix for this:
/[\*\s]{3}(.*)\s*=\sGenerates?(.*\.|.*\s*.*\.)(\s*Optional\s\[arch\]\scan\sbe\s(".*").)?/g

PS: This is my first issue I'm submitting, so please be easy on me :)

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.