Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to use CMake: Build anymore since version 1.2.0 #968

Closed
haytaylan opened this issue Dec 12, 2019 · 4 comments
Closed

Not able to use CMake: Build anymore since version 1.2.0 #968

haytaylan opened this issue Dec 12, 2019 · 4 comments
Labels
bug a bug in the product Feature: build
Milestone

Comments

@haytaylan
Copy link

Brief Issue Summary

Running "CMake: Build" command no longer builds my project. It works as expected when I rollback my extension version to 1.1.3.

Expected:

  1. Create a CMake project using CMake: Quick Start
  2. Run CMake: Build after necessary configurations.
  3. Build completes succesfully.

Apparent Behavior:

I have set the compiler toolchain to be GCC. ( I am using mingw-64 on Windows 7 and i have checked the paths are configured correctly. CMakeCache.txt is also configured correctly )

When i run CMake: Build, VSCode asks me to choose a build task among several tasks listed as "make: xx". When i choose make: all (or anything else in particular), VSCode tries to run the task but it fails because ""nmake" is not recognized as an internal or external command". I did not configure my environment to use nmake as i didn't intend to. The older version (1.1.3) does not ask for a build task and builds the project succesfully.

CMake Tools Log

[proc]Executing command .....Cmake.EXE --build <Project build folder> --config all... (Everything appears to be correct on this line)
[build]Build finished with exit code 0.

Platform and Versions

  • Operating System: Windows 7
  • CMake Version: 3.16.1
  • VSCode Version: 1.40
  • CMake Tools Extension Version: 1.2.3 (Checked with version 1.2.0 too and that does not seem to work also)
  • Compiler/Toolchain: GCC 4.9.1

Other Notes/Information

I have searched but haven't found an issue similar to this one.

@bobbrow bobbrow added bug a bug in the product Feature: build labels Dec 23, 2019
@bobbrow
Copy link
Member

bobbrow commented Dec 23, 2019

Are you able to zip up the project and attach it to this issue? I don't have this problem when I run the Quick Start command on an empty folder. I selected my mingw-w64 kits (I don't have 4.9.1), but I don't think that's the part that would be causing you trouble.

[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build d:/test/cmake968/build --config Debug --target all -- -j 10
[build] [1/2  50% :: 1.059] Building CXX object CMakeFiles/test1.dir/main.cpp.obj
[build] [2/2 100% :: 1.367] Linking CXX executable test1.exe
[build] Build finished with exit code 0

I do see a different problem configuring with MinGW that I thought we fixed in 1.2.3, but it looks like that commit didn't make it in.

@bobbrow bobbrow added the more info needed More info is needed from the community for us to properly triage and investigate. label Dec 23, 2019
@haytaylan
Copy link
Author

haytaylan commented Dec 24, 2019

I have zipped and uploaded the folder to the following url. Due to my company's proxy policies, i had to remove the binary files and rename the directory names. I hope it helps.

https://drive.google.com/file/d/0B_GUKUXQhaFBbnBHZnYwV3A2M2J1MmxNU3lOSkwtQ1l3Qy1B/view?usp=drivesdk

@andreeis andreeis added this to the 1.4.0 milestone Jan 27, 2020
@andreeis andreeis removed the more info needed More info is needed from the community for us to properly triage and investigate. label Jan 27, 2020
@haytaylan
Copy link
Author

I recently had time to inspect this issue and realized that when Cmake Tools' new version (1.2.0 or higher) was installed the first time, the new setting cmake.buildTask was set to true in the user configuration. Since i didn't have any build task, the process was failing. I had a successful build when I set cmake.buildTask setting to false

@bobbrow
Copy link
Member

bobbrow commented Apr 7, 2020

Interesting. We don't set this anywhere in our code, so I don't see anywhere that we can add a patch for this. If it happens again, please let us know.

@bobbrow bobbrow closed this as completed Apr 7, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: build
Projects
None yet
Development

No branches or pull requests

3 participants