All depends on the setuo …

The CMAKE_BUILD_TYPE 
Has the only effect to chose for the compilation and linking
The appropriate flags

The RELEASE,RELWITHDEBINFO,DEBUG,MINSIZEREL types
Are the ones handled automatically by CMAKE

The variable used for that are of the form
CMAKE_CXX_FLAGS_<CMAKE_BUILD_TYPE> 

CMAKE_CXX_FLAGS                                     
CMAKE_CXX_FLAGS_DEBUG            
CMAKE_CXX_FLAGS_MINSIZEREL        
CMAKE_CXX_FLAGS_RELEASE         
CMAKE_CXX_FLAGS_RELWITHDEBINFO 

And cmake will use the appropriate ones 

If no build type is specified 
The compiler and the linker flags are empty 

If You go to the build directory  the command 
Ccmake .
Will open a ncusers based cmake session
Where You can modify some CMAKE options 
It You enter t it will show all ( almost ) the variable used by CMAKE

In my projects I have an include module
to set defaults different from the cmake provided ones 
You should be able to look at them :-)

But cmake is smarter than most people think 

You can for example 

Cmake -DCMAKE_BUILD_TYPE=My … … …

And cmake will use the flags contained in the variables of the form
CMAKE_CXX_FLAGS_MY

E



> On 4 Dec 2018, at 15:25, Rony G. Flatscher <[email protected]> wrote:
> 
> While creating new installation packages from trunk for Windows, I have 
> experimented with the different build types with CMake.
> 
> Question: would the following create a DEBUG or a RELEASE version by default?
> cmake -G "NMake Makefiles" F:\work\svn\oorexx\main\trunk

_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to