Code Monkey home page Code Monkey logo

Comments (11)

Civitasv avatar Civitasv commented on July 30, 2024 1

From CMake.org

inherits
An optional array of strings representing the names of presets to inherit from. This field can also be a string, which is equivalent to an array containing one string.
The preset will inherit all of the fields from the inherits presets by default (except name, hidden, inherits, description, and displayName), but can override them as desired. If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits array will be preferred.
A preset can only inherit from another preset that is defined in the same file or in one of the files it includes (directly or indirectly). Presets in CMakePresets.json may not inherit from presets in CMakeUserPresets.json.

I will fix it soon.

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024 1

Another complexity you may not have accounted for :https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion

for example, I often set binaryDir to ${sourceDir}/build/${presetName} in a base preset.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024 1

Now it should work as expected. 86124bd

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024

I'm getting an error when I run :CMakeSelectConfigurePreset

Error executing Lua callback: ...k/packer/start/cmake-tools.nvim/lua/cmake-tools/init.lua:448: attempt to index upvalue 'config' (a nil value)
stack traceback:
        ...k/packer/start/cmake-tools.nvim/lua/cmake-tools/init.lua:448: in function 'on_choice'
        /usr/share/nvim/runtime/lua/vim/ui.lua:54: in function 'select'
        ...k/packer/start/cmake-tools.nvim/lua/cmake-tools/init.lua:443: in function <...k/packer/start/cmake-tools.nvim/lua/cmake-tools/init.lua:430>

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Please check the latest commit. It should work well.

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024

I now get the original behavior for :CMakeBuild.

      Error: could not load cache
      Error: could not load cache

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Delete build directory and rebuild.

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024

I think I see what's happening. I believe there are some issues evaluating inheritance. In the following example, I am able to configure/generate/build with the defaults preset, but not the extended preset.

{
  "version": 3,
  "configurePresets": [
    {
      "name": "defaults",
      "binaryDir": "example_build_directory"
    },
    {
      "name": "extended",
      "inherits": ["defaults"]
    },
  ]
}

Awesome progress so far. Thank you.

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024

thank you so much!

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

About Macro, currently it doesn't support $env, $penv and $vendor

from cmake-tools.nvim.

thetic avatar thetic commented on July 30, 2024

I'm satisfied. Maybe backlog those in case anyone ever wants those, but I've never seen those used to assign the binary directory.

Thanks again for your work on this.

from cmake-tools.nvim.

Related Issues (20)

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.