LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 07-29-2020, 12:09 PM   #1
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Building CMake Qt projects with VSCode


Just spent some time trying to figure out how to set up VSCode to edit my current project, which is Qt and CMake.

I have the latest version of Qt from the Qt homepage. To get CMake see it, I set the following environment variable.

Code:
export Qt5_DIR "$HOME/Qt/5.15.0/clang_64/lib/cmake/Qt5"
I start VSCode with "code ." in the root of the project.

I install two extension: "C/C++" and "CMake Tools".

I pull up the Command palette and choose "CMake: Configure". That creates the usual "build" folder and runs CMake. It also puts a compile_commands.json file in the build directory.

I get a popup that says "CMake Tools would like to configure IntelliSense for this folder." I choose "Don't Allow".

I get another popup that says ""Would you like to use ${workspaceFolder/build/compile_commands.json to auto-configure IntelliSense for this folder?" I choose"Yes".

That's the setup that I've found works for me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] problem with newer cmake options run on slackware cmake 3.5.2 timsoft Slackware 6 05-31-2020 07:51 AM
Hi all, i am new to cmake in linux so i am trying to design a c++ project that connects to mariadb using cmake, but i run into an error. Naptar Linux - Newbie 0 01-19-2019 11:46 AM
Slackware-current: /usr/share/cmake and /usr/share/cmake-3.3 directories igor29768 Slackware 1 11-07-2015 12:37 AM
CMake Strange "Install" behaviour with home-grown software [Linux x86_64, CMake 2.8] ajschaeffer Programming 0 10-24-2011 03:21 AM
cmake: Using find_package(Boost) when FindBoost.cmake is not in the default location damien_d Programming 3 10-27-2010 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 12:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration