@ -23,6 +23,10 @@ include( CheckCXXCompilerFlag )
# # # # # i n i t i a l i z a t i o n . . .
if ( NOT TDE_CMAKE_ROOT )
if ( "${CMAKE_VERSION}" VERSION_LESS "3.1" )
message ( FATAL_ERROR "CMake >= 3.1.0 required" )
endif ( )
if ( ${ CMAKE_CURRENT_LIST_DIR } STREQUAL ${ CMAKE_ROOT } /Modules )
# T D E C M a k e i s i n s t a l l e d i n t h e s y s t e m d i r e c t o r y
@ -792,6 +796,8 @@ macro( tde_add_library _arg_target )
unset ( _version )
unset ( _release )
unset ( _sources )
unset ( _cxx_features )
unset ( _cxx_features_private )
unset ( _destination )
unset ( _embed )
unset ( _link )
@ -878,6 +884,18 @@ macro( tde_add_library _arg_target )
set ( _storage "_sources" )
endif ( "+${_arg}" STREQUAL "+SOURCES" )
# f o u n d d i r e c t i v e " C X X _ F E A T U R E S "
if ( "+${_arg}" STREQUAL "+CXX_FEATURES" )
set ( _skip_store 1 )
set ( _storage "_cxx_features" )
endif ( "+${_arg}" STREQUAL "+CXX_FEATURES" )
# f o u n d d i r e c t i v e " C X X _ F E A T U R E S _ P R I V A T E "
if ( "+${_arg}" STREQUAL "+CXX_FEATURES_PRIVATE" )
set ( _skip_store 1 )
set ( _storage "_cxx_features_private" )
endif ( "+${_arg}" STREQUAL "+CXX_FEATURES_PRIVATE" )
# f o u n d d i r e c t i v e " E M B E D "
if ( "+${_arg}" STREQUAL "+EMBED" )
set ( _skip_store 1 )
@ -997,6 +1015,15 @@ macro( tde_add_library _arg_target )
# a d d t a r g e t
add_library ( ${ _target } ${ _type } ${ _exclude_from_all } ${ _sources } )
# s e t c x x f e a t u r e s
if ( _cxx_features )
target_compile_features ( ${ _target } PUBLIC ${ _cxx_features } )
endif ( )
if ( TDE_CXX_FEATURES OR PROJECT_CXX_FEATURES OR _cxx_features_private )
target_compile_features ( ${ _target } PRIVATE
$ { T D E _ C X X _ F E A T U R E S } $ { P R O J E C T _ C X X _ F E A T U R E S } $ { _ c x x _ f e a t u r e s _ p r i v a t e } )
endif ( )
# w e a s s u m e t h a t m o d u l e s h a v e n o p r e f i x a n d n o v e r s i o n
# a l s o , s h o u l d n o t l i n k
if ( ${ _type } STREQUAL "MODULE" )
@ -1235,6 +1262,7 @@ macro( tde_add_executable _arg_target )
unset ( _meta_includes )
unset ( _setuid )
unset ( _sources )
unset ( _cxx_features )
unset ( _destination )
unset ( _link )
unset ( _dependencies )
@ -1289,6 +1317,12 @@ macro( tde_add_executable _arg_target )
set ( _storage "_sources" )
endif ( "+${_arg}" STREQUAL "+SOURCES" )
# f o u n d d i r e c t i v e " C X X _ F E A T U R E S "
if ( "+${_arg}" STREQUAL "+CXX_FEATURES" )
set ( _skip_store 1 )
set ( _storage "_cxx_features" )
endif ( "+${_arg}" STREQUAL "+CXX_FEATURES" )
# f o u n d d i r e c t i v e " L I N K "
if ( "+${_arg}" STREQUAL "+LINK" )
set ( _skip_store 1 )
@ -1372,6 +1406,12 @@ macro( tde_add_executable _arg_target )
# a d d t a r g e t
add_executable ( ${ _target } ${ _sources } )
# s e t c x x f e a t u r e s
if ( TDE_CXX_FEATURES OR PROJECT_CXX_FEATURES OR _cxx_features )
target_compile_features ( ${ _target } PRIVATE
$ { T D E _ C X X _ F E A T U R E S } $ { P R O J E C T _ C X X _ F E A T U R E S } $ { _ c x x _ f e a t u r e s } )
endif ( )
# s e t l i n k l i b r a r i e s
if ( _link )
target_link_libraries ( ${ _target } ${ _link } )