eady, you can access environment variables using
> $ENV{variable} syntax in CMake.
>
>
>
> Hope this helps.
>
>
>
> Miroslav
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Fedja
> Jeleskovic
> *Sent:* Friday, April 01, 2016 8:08 PM
> *To:
@cmake.org] On Behalf Of Fedja Jeleskovic
Sent: Friday, April 01, 2016 8:08 PM
To: cmake@cmake.org
Subject: [CMake] Parsing command line arguments from the make
Since I am converting existing makefile project to use cmake instead I need to
accept values that come from command line which looks like this:
VAR
To make my question a bit more clear, I am trying to figure out how to add
these things so my make will be able to use them. If I need environment
variable inside the cmake, I could use $ENV{VARIABLE_NAME} and have it.
The problem is to create the code inside the CMakeLists.txt, so that
generated
Since I am converting existing makefile project to use cmake instead I need
to accept values that come from command line which looks like this:
VARIABLE_NAME="/home/user/project" make ENV=VERSION_2
First one is used like this:
include $(VARIABLE_NAME)/Makefile.include
Second one has this code