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

Can't give Clion tools to import cmake projects #14

Open
Atemu opened this issue Apr 27, 2021 · 5 comments
Open

Can't give Clion tools to import cmake projects #14

Atemu opened this issue Apr 27, 2021 · 5 comments

Comments

@Atemu
Copy link

Atemu commented Apr 27, 2021

I've got a pretty simple Clion project on macOS that I also want to be able to work on from NixOS.

I've added a shell.nix like this:

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    cmake
  ];

  CMAKE_MAKE_PROGRAM = "make";
  CMAKE_C_COMPILER = "$CC";
  CMAKE_CXX_COMPILER = "$CXX";
}

but Clion's cmake loading can't see these variables and fails to do anything, complaining that they're not set.

In the IDE's terminal, the variables are set and I can execute the tools as expected.

@fehnomenal
Copy link
Owner

Could you please post your .envrc?

@Atemu
Copy link
Author

Atemu commented Apr 29, 2021

It's just use nix.

@Atemu
Copy link
Author

Atemu commented Apr 25, 2022

This is still an issue unfortunately, any hints to what could cause this?

@fehnomenal
Copy link
Owner

fehnomenal commented Apr 26, 2022

Sometimes I need to open the settings dialog twice for the variables to appear. If this does not help the problem is maybe the same as #11.
Does it work, when you launch clion from the terminal after direnv loaded the environment into the shell?

@Atemu
Copy link
Author

Atemu commented Mar 7, 2023

It does indeed work when launching it from the terminal.

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

No branches or pull requests

2 participants