Re: [CMake] Parsing command line arguments from the make

2016-04-05 Thread Fedja Jeleskovic
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:

Re: [CMake] Parsing command line arguments from the make

2016-04-05 Thread Matějů Miroslav , Ing .
@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

Re: [CMake] Parsing command line arguments from the make

2016-04-01 Thread Fedja Jeleskovic
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

[CMake] Parsing command line arguments from the make

2016-04-01 Thread Fedja Jeleskovic
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