You are not logged in.

#1 2020-03-22 05:01:19

kovac
Member
Registered: 2020-03-14
Posts: 41

[SOLVED] How to set default CMAKE_GENERATOR to Ninja?

Hi guys,

I'm struggling to configure cmake. I'm trying to set my default CMAKE_GENERATOR to Ninja. I tried a couple of ways so far.

Method 1:

Created a environment.sh file in /etc/profile.d and placed the following content in it.

#!/bin/sh
export CMAKE_GENERATOR=Ninja

Method 2:

Added the following line to /etc/environment.

CMAKE_GENERATOR=Ninja

When I try "echo $CMAKE_GENERATOR" it looks like the env variable is correctly set. However when I check cmake configuration using "cmake --help", I can see that the default generator is still set to  "Unix Makefiles".

My cmake version is 3.16.5.

Last edited by kovac (2020-03-22 07:12:41)

Offline

#2 2020-03-22 07:12:20

kovac
Member
Registered: 2020-03-14
Posts: 41

Re: [SOLVED] How to set default CMAKE_GENERATOR to Ninja?

Never mind. My method 1 of setting the make program was working. The issue was with the specific program I was trying to install.

Offline

Board footer

Powered by FluxBB