Hi Mike

 

Thanks for the help. I understood your solution but it cannot be applied
to my project. This is because I am automating the entire build process
which does not require any manual intervention. Now to achieve this
after writing all my CMakeLists.txt files, I just give the command, 

 

"cmake ." 

 

in  the source directory. This creates all the relevant makefiles. Now
my question is:

 

1.      What is the default BUILD TYPE if we are not changing anything?
2.      Is there a way if we can set the BUILD TYPE in my CMakeLists.txt
so that after giving the command "cmake ." at the command prompt, I get
the particular build type set in my makefiles?

 

Thanks and Regards

Anupam Malhotra

 

________________________________

From: Mike Jackson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2008 8:11 PM
To: Malhotra, Anupam
Cc: [email protected]
Subject: Re: [CMake] Selecting DEBUG and RELEASE Builds in Linux

 

Visual Studio and Xcode are special cases where you can select in the
IDE which type of build to run. If you are generating Makefiles then you
need to set the CMAKE_BUILD_TYPE in cmake _before_ generating the
makefiles. The easiest way to achieve this is to run ccmake and then
select the CMAKE_BUILD_TYPE variable and either put in "Debug" or
"Release".

 

CMake only supports one build type per build tree. So you will need to
create 2 build trees, one for Debug and one for Release. Does this help?

 

-- 

Mike Jackson   Senior Research Engineer

Innovative Management & Technology Services





 

On Mar 4, 2008, at 3:36 AM, Malhotra, Anupam wrote:





Hi

 

I read on the CMake wiki page that:

 

CMAKE_BUILD_TYPE is not initialized with a readable value at
configuration time. This is because the user is free to select a build
type at build time. Now in visual studio 6/visual studio 8 2005 we can
select the build type by selecting Debug/Release after opening the
workspace/solution. But how can the same be achieved in Linux? After my
makefiles are generated using cmake, I want to first build the Debug
mode and then the release mode. But how do I select which build type to
select while building? Please advise.

 

Thanks and Regards

Anupam Malhotra

 

The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.
 
 

_______________________________________________

CMake mailing list

[email protected]

http://www.cmake.org/mailman/listinfo/cmake

 


The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.


_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to