Creating a custom make-based setup for a project
-
Hi
I have installed Qt creator on my Ubuntu 20.04 machine and would like to import and build a C++ project. Normally, on the terminal, I run the following commands:$ cd project $ source ./simulator/setup.sh ... some outputs $ make -C ./simulator
I tried to define those commands in the project setting as can be seen below. However, the source command is said to be invalid. Also, when I clock on build, nothing happens.
Any idea how to fix that?
-
Hi
I have installed Qt creator on my Ubuntu 20.04 machine and would like to import and build a C++ project. Normally, on the terminal, I run the following commands:$ cd project $ source ./simulator/setup.sh ... some outputs $ make -C ./simulator
I tried to define those commands in the project setting as can be seen below. However, the source command is said to be invalid. Also, when I clock on build, nothing happens.
Any idea how to fix that?
-
@mahmoodn
source
is a shell built-in not an executable the majority of cases; this is the likely origin of this version of the problem. Since the shell scriptsetup_environment.sh
has a she-bang (#!) line just make sure it is executable and call it directly.That said, I would be surprised if environment variables set and exported by that script will be available in later steps. The steps are likely to be executed in independent environments. Might be wrong.
-
@mahmoodn said in Creating a custom make-based setup for a project:
You mea like this?
No, that is not what I mean. Put only the path to the script...
-
@jsulm
OK that helped. Please see the picture.I was wondering why git command is not recognized. Prior to that I saw that nvcc is also not recognized. So, I manually added that path in the variables. Is there any way to invoke user environment variables to the project instead of manually specifying them?