The build types as defined by CMAKE provide as a courtesy to the developer A set of predefined flags for the compiler and the linker
CMAKE_C_FLAGS='' CMAKE_C_FLAGS_DEBUG='-g' CMAKE_C_FLAGS_MINSIZEREL='-Os -DNDEBUG' CMAKE_C_FLAGS_RELEASE='-O3 -DNDEBUG' CMAKE_C_FLAGS_RELWITHDEBINFO='-O2 -g -DNDEBUG' CMAKE_CXX_FLAGS='' CMAKE_CXX_FLAGS_DEBUG='-g' CMAKE_CXX_FLAGS_MINSIZEREL='-Os -DNDEBUG' CMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG' CMAKE_CXX_FLAGS_RELWITHDEBINFO='-O2 -g -DNDEBUG' An equivalent set of flags are provided for the linker You are free to define Your own build types As long as You define the same set of flags with the last token set To the build type name CMAKE does not check the build type, Specifying an unknown build type implies that no specific flags will be provided Enrico Ps Find attached a function that will dump all the known CMAKE variables At time of invocation It will help in finding out the values of little known variables #[[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - vDump.cmake Copyright Enrico Sorichetti 2018 - 2019 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #]] #[[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #]] include_guard( GLOBAL ) #[[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #]] function( vdump _ARGlist _ARGline ) if( ${_ARGline} MATCHES "^[0-9]+$" ) set( _line "0000${_ARGline}" ) string( LENGTH "${_line}" _len ) math( EXPR _indx "${_len} - 4" ) string(SUBSTRING ${_line} ${_indx} -1 _line ) else() string( REGEX REPLACE "[^a-zA-Z0-9_]" "_" _line "${_ARGline}" ) endif() get_filename_component( _list "${_ARGlist}" NAME_WE) if( "${_line}" STREQUAL "" ) string( REGEX REPLACE "[^a-zA-Z0-9_]" "_" _out "vars_for_${_list}") else() string( REGEX REPLACE "[^a-zA-Z0-9_]" "_" _out "vars_for_${_list}_at_${_line}") endif() set( _out "${CMAKE_BINARY_DIR}/${_out}.txt" ) file( REMOVE ${_out} ) set( _buf "" ) get_cmake_property( _vars VARIABLES ) foreach( _var IN LISTS _vars ) string( LENGTH "${_var}" _len ) if( _len LESS 4 ) continue() endif() if( "${_var}" MATCHES "^(_)" ) continue() endif() if( "${_var}" MATCHES "^(ARG)" ) continue() endif() if( "${_var}" STREQUAL "OUTPUT" ) continue() endif() if( "${_var}" MATCHES "(_CONTENT)$" ) continue() endif() if( "${_var}" MATCHES "(_COMPILER_ID_TOOL_MATCH_REGEX)$" ) continue() endif() string( APPEND _buf "[[ ${_var}='${${_var}}'\n" ) endforeach() file( WRITE "${_out}" "${_buf}" ) endfunction() Just invoke it with vdump( ${CMAKE_CURRENT_LIST_FILE} "${CMAKE_CURRENT_LIST_LINE}” ) > On 4 Jan 2019, at 20:53, P.O. Jonsson <oor...@jonases.se> wrote: > > I think this is related to the question "Questions ad differences between > "RELEASE", "DEBUG" and "RELWITHDEBUGINFO" on Windows?“ asked by Rony 4 Dec > 2018, It would be most welcome to have this clarified on all platforms (what > switches and where do they interact with the build process). > > I have tried to read cmakelists.txt for answers but does not get me any wiser > :-(. > > Hälsningar/Regards/Grüsse, > P.O. Jonsson > oor...@jonases.se <mailto:oor...@jonases.se> >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel