Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] ShowProjectConfig CMake Module. #2161

Merged
merged 4 commits into from
Oct 27, 2021
Merged

[build] ShowProjectConfig CMake Module. #2161

merged 4 commits into from
Oct 27, 2021

Conversation

jlsantiago0
Copy link
Contributor

Implement a CMakeModule that can be used to Print the SRT Project Configuration and enable it by default:

Example:

========================================================================
= Project Configuration:
========================================================================
  SRT Version:
    SRT_VERSION: 1.4.4
    SRT_VERSION_BUILD: 
  CMake Configuration:
    CMAKE_VERSION: 3.16.3
    CMAKE_INSTALL_PREFIX: /mnt/jlsws0/dev/orthrus/master/src/vendor/utils/haisrt/tt/bb22/stage
    CMAKE_BUILD_TYPE: Release
  Target Configuration:
    CMAKE_SYSTEM_NAME: Linux
    CMAKE_SYSTEM_VERSION: 5.11.0-34-generic
    CMAKE_SYSTEM_PROCESSOR: x86_64
    CMAKE_SIZEOF_VOID_P: 8
    DARWIN: 0
    LINUX: 1
    BSD: 0
    MICROSOFT: 0
    GNU: 0
    ANDROID: 0
    SUNOS: 0
    POSIX: 1
    SYMLINKABLE: 1
    APPLE: 
    UNIX: 1
    WIN32: 
    MINGW: 
    CYGWIN: 
    CYGWIN_USE_POSIX: OFF
  Toolchain Configuration:
    CMAKE_TOOLCHAIN_FILE: 
    CMAKE_CROSSCOMPILING: FALSE
    CMAKE_C_COMPILER_ID: GNU
    CMAKE_C_COMPILER_VERSION: 9.3.0
    CMAKE_C_COMPILER: /usr/bin/cc
    CMAKE_C_COMPILE_FEATURES: c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert
    CMAKE_C_STANDARD: 
    CMAKE_CXX_COMPILER_ID: GNU
    CMAKE_CXX_COMPILER_VERSION: 9.3.0
    CMAKE_CXX_COMPILER: /usr/bin/c++
    CMAKE_CXX_COMPILE_FEATURES: cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20
    CMAKE_CXX_STANDARD: 
    CMAKE_LINKER: /usr/bin/ld
    CMAKE_NM: /usr/bin/nm
    CMAKE_AR: /usr/bin/ar
    CMAKE_RANLIB: /usr/bin/ranlib
    HAVE_COMPILER_GNU_COMPAT: 1
    CMAKE_THREAD_LIBS: 
    CMAKE_THREAD_LIBS_INIT: -lpthread
    ENABLE_THREAD_CHECK: 
    USE_CXX_STD_APP: 
    USE_CXX_STD_LIB: 
    STDCXX: 
    USE_CXX_STD: 
    HAVE_CLOCK_GETTIME_IN: 1
    HAVE_CLOCK_GETTIME_LIBRT: 
    HAVE_PTHREAD_GETNAME_NP_IN_PTHREAD_NP_H: 
    HAVE_PTHREAD_SETNAME_NP_IN_PTHREAD_NP_H: 
    HAVE_PTHREAD_GETNAME_NP: 1
    HAVE_PTHREAD_SETNAME_NP: 1
    HAVE_LIBATOMIC: 1
    HAVE_LIBATOMIC_COMPILES: 1
    HAVE_LIBATOMIC_COMPILES_STATIC: 1
    HAVE_GCCATOMIC_INTRINSICS: 1
    HAVE_GCCATOMIC_INTRINSICS_REQUIRES_LIBATOMIC: 
    HAVE_CXX_ATOMIC: 1
    HAVE_CXX_ATOMIC_STATIC: 1
  Project Configuration:
    ENABLE_DEBUG: OFF
    ENABLE_CXX11: ON
    ENABLE_APPS: ON
    ENABLE_EXPERIMENTAL_BONDING: OFF
    ENABLE_TESTING: OFF
    ENABLE_PROFILE: OFF
    ENABLE_LOGGING: ON
    ENABLE_HEAVY_LOGGING: OFF
    ENABLE_HAICRYPT_LOGGING: OFF
    ENABLE_SHARED: ON
    ENABLE_STATIC: ON
    ENABLE_RELATIVE_LIBPATH: OFF
    ENABLE_GETNAMEINFO: OFF
    ENABLE_UNITTESTS: OFF
    ENABLE_ENCRYPTION: ON
    ENABLE_CXX_DEPS: ON
    USE_STATIC_LIBSTDCXX: OFF
    ENABLE_INET_PTON: ON
    ENABLE_CODE_COVERAGE: OFF
    ENABLE_MONOTONIC_CLOCK: ON
    ENABLE_STDCXX_SYNC: OFF
    USE_OPENSSL_PC: ON
    USE_BUSY_WAITING: OFF
    USE_GNUSTL: OFF
    ENABLE_SOCK_CLOEXEC: ON
    ENABLE_SHOW_PROJECT_CONFIG: ON
    ENABLE_CLANG_TSA: OFF
    ATOMIC_USE_SRT_SYNC_MUTEX: OFF
  Constructed Configuration:
    DISABLE_CXX11: 
    USE_ENCLIB: openssl
    ENABLE_EXAMPLES: 
    TARGET_srt: srt
    srt_libspec_static: ON
    srt_libspec_shared: ON
    Target Link Libraries:
      Static: ssl;crypto;-lpthread;atomic
      Shared: ssl;crypto;-lpthread
========================================================================

@maxsharabayko maxsharabayko added [build] Area: Changes in build files Type: Enhancement Indicates new feature requests labels Oct 12, 2021
@maxsharabayko maxsharabayko added this to the v1.4.5 milestone Oct 12, 2021
@maxsharabayko
Copy link
Collaborator

Please also add the new option (ENABLE_SHOW_PROJECT_CONFIG) to the "build options" documentation.
The document describes build option of the ./configure script instead of CMake build option directly.
However, the document will likelyl be used as a base for the proper documentation of SRT CMake build options.

Please note, configure scriptexpects--enable-show-project-configoption, and it will automatically convert it to CMake format ofENABLE_SHOW_PROJECT_CONFIG`.

@jlsantiago0 jlsantiago0 changed the title ShowProjectConfig CMake Module. [build] ShowProjectConfig CMake Module. Oct 12, 2021
Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make such verbose output off by default.

CMakeLists.txt Outdated Show resolved Hide resolved
docs/build/build-options.md Outdated Show resolved Hide resolved
@maxsharabayko maxsharabayko merged commit d9b7988 into Haivision:master Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants