diff options
author | Allen Winter <winter@kde.org> | 2022-06-03 09:14:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 09:14:38 -0400 |
commit | a2be6d9ca1a1db38ce362a900675f527fc5d12b3 (patch) | |
tree | 9861c7b2e995a1650b9a52d0bf896e888ebd7bd3 /cmake/modules/LibIcalMacrosInternal.cmake | |
parent | 7f704bd9dd9e76f055456fec39b5d037bfdce697 (diff) | |
parent | 6908abbf9238295910aef8d5259a8cc38c87329b (diff) | |
download | libical-git-mcclurgm-readme-mainpage.tar.gz |
Merge branch 'master' into mcclurgm-readme-mainpagemcclurgm-readme-mainpage
Diffstat (limited to 'cmake/modules/LibIcalMacrosInternal.cmake')
-rw-r--r-- | cmake/modules/LibIcalMacrosInternal.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/modules/LibIcalMacrosInternal.cmake b/cmake/modules/LibIcalMacrosInternal.cmake index ed197a15..bc527636 100644 --- a/cmake/modules/LibIcalMacrosInternal.cmake +++ b/cmake/modules/LibIcalMacrosInternal.cmake @@ -3,12 +3,14 @@ include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +# Call option() and then add_feature_info() function(libical_option option description) set(extra_option_arguments ${ARGN}) option(${option} "${description}" ${extra_option_arguments}) add_feature_info("Option ${option}" ${option} "${description}") endfunction() +# Warn about deprecated cmake options then call libical_option function(libical_deprecated_option deprecated_option option description) set(extra_option_arguments ${ARGN}) if(${deprecated_option}) @@ -18,6 +20,7 @@ function(libical_deprecated_option deprecated_option option description) libical_option(${option} "${description}" ${extra_option_arguments}) endfunction() +# If condition is True, append the specified value to each ARGN function(libical_append_if condition value) if(${condition}) foreach(variable ${ARGN}) @@ -26,11 +29,17 @@ function(libical_append_if condition value) endif() endfunction() +# Create a variable C_SUPPORTS_<flag> with a boolean denoting +# if the C compiler supports that flag; if so, append the flag +# to the global CMAKE_C_FLAGS variable. macro(libical_add_cflag flag name) check_c_compiler_flag("${flag}" "C_SUPPORTS_${name}") libical_append_if("C_SUPPORTS_${name}" "${flag}" CMAKE_C_FLAGS) endmacro() +# Create a variable CXX_SUPPORTS_<flag> with a boolean denoting +# if the C++ compiler supports that flag; if so, append the flag +# to the global CMAKE_CXX_FLAGS variable. macro(libical_add_cxxflag flag name) check_cxx_compiler_flag("${flag}" "CXX_SUPPORTS_${name}") libical_append_if("CXX_SUPPORTS_${name}" "${flag}" CMAKE_CXX_FLAGS) |