question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create build directory only if build is performed

See original GitHub issue

Brief Issue Summary

The build directory should NOT be (re)created every time user opens a folder with CMakeLists.txt in VSCode, but only on-demand when actual build is configured/performed.

Expected:

  1. mkdir test
  2. Create test/CMakeListst.txt
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(test)
  1. Explore® to parent of test > right-click on test > Open with Code
  2. Close the Code
  3. No test/build subdirectory should be created and left dangling as empty cruft!

Apparent Behavior:

  1. test/build subdirectory is created, despite it is EMPTY and has NOT been used.

[[For issues, fill out the following. Otherwise delete this section.]]

  • Operating System: Windows 10 Version 1709 (Build 16299)
  • CMake Version: 3.11
  • VSCode Version: 1.22.1
  • CMake Tools Extension Version: 0.10.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mloskotcommented, Jun 11, 2018

@vector-of-bool using the latest VSCode 1.25.0-insider with the CMake Tools 1.0.1 I no longer see the problem occurring. Thank you!

0reactions
vector-of-boolcommented, Jun 10, 2018

I’m going to close this, but re-open it if it is still occurring.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically Making Build Directories in Make
Here you can see mkdir is only run once and touching the build directory doesn't force a rebuild of the targets. Is this...
Read more >
Create directories using make file - Stack Overflow
You should create files and if a file creation needs a new directory then ... Default goal all: gccversion makedir build finalize list...
Read more >
Automatically create and configure build directory if it doesn't ...
I recently had to build a meson project and their way of configuring a project by just running meson build is very convenient....
Read more >
Customize your build - MSBuild - Microsoft Learn
Create a new file in the root of your repo called Directory.Build.props. Add the following XML to the file. XML Copy.
Read more >
Making directories in GNU Make | CMCrossroads
A related solution is to only build the directory when all is being built. This means that the directories won\'t get created every...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found