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

Ignore local and generated files in VSCode #4266

Closed
niranjan-nilakantan opened this issue Jun 1, 2023 · 1 comment · Fixed by #4267
Closed

Ignore local and generated files in VSCode #4266

niranjan-nilakantan opened this issue Jun 1, 2023 · 1 comment · Fixed by #4267
Assignees

Comments

@niranjan-nilakantan
Copy link
Contributor

Describe the issue

When using VSCode with the googletest source,
there are several generated files.

These should be added to .gitignore by default to avoid cluttering the "source control changed files" view.
e.g. .cache

Additionally, some settings file are useful for local development, but should not be checked in.
e.g. cmake-variants.yaml that allows choosing whether to build the tests or not.

Steps to reproduce the problem

Open the googletest directory in VSCode.

Open a C++ file, with clangd as the language service provider.

What version of GoogleTest are you using?

$ git rev-parse HEAD

f625681bc4086c35099475f0d17e161f1c6ac9a1

What operating system and version are you using?

$ lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.04
Release:	23.04
Codename:	lunar

What compiler and version are you using?

$ icpx -v

Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm
Configuration file: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../bin/icpx.cfg
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64

What build system are you using?

$ cmake --version

cmake version 3.25.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Additional context

No response

@niranjan-nilakantan
Copy link
Contributor Author

niranjan-nilakantan commented Jun 1, 2023

Example cmake-variants.yaml

We can now choose Release Test LinuxIntelLLVM as the build configuration in VSCode.

buildType:
  default: debug
  choices:
    debug:
      short: Debug
      long: Emit debug information
      buildType: Debug
    release:
      short: Release
      long: Optimize generated code
      buildType: Release

testing:
  default: no_test
  choices:
    no_test:
      short: NoTest
      long: Do not build tests
    test:
      short: Test
      long: Build tests
      settings:
        gtest_build_tests: ON
        gmock_build_tests: ON

compiler:
  default: linux_intel
  choices:
    linux_intel:
      short: LinuxIntelLLVM
      long: Build with IntelLLVM on Linux
      settings:
        CMAKE_C_COMPILER: icx
        CMAKE_CXX_COMPILER: icpx
    linux_clang:
      short: LinuxCLang
      long: Build with CLang on Linux
      settings:
        CMAKE_C_COMPILER: clang-16
        CMAKE_CXX_COMPILER: clang++-16

@higher-performance higher-performance self-assigned this Jun 5, 2023
kunitoki pushed a commit to kunitoki/googletest that referenced this issue Nov 4, 2023
This is populated by the clangd language service provider.

Also ignore the cmake-variants.yaml file.
This can be created locally to select various build/test configurations.

Fixes google#4266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants