Skip to content

Commit

Permalink
#1602: CMake: clean up configuration printing
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 17, 2021
1 parent 6977d88 commit 3d4b876
Showing 1 changed file with 42 additions and 38 deletions.
80 changes: 42 additions & 38 deletions cmake/configure_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ else()
endif()
list(REMOVE_DUPLICATES VT_CONFIG_TYPES)

list(APPEND CMAKE_MESSAGE_INDENT "Building VT with ")

option(vt_lb_enabled "Build VT with load balancing enabled" ON)
option(vt_trace_enabled "Build VT with trace enabled" OFF)
option(vt_priorities_enabled "Build VT with message priorities enabled" ON)
Expand All @@ -34,65 +36,65 @@ set(
)

if (${vt_test_trace_runtime_enabled})
message(STATUS "Building VT with runtime tracing enabled (for testing)")
message(STATUS "runtime tracing enabled (for testing)")
set(vt_feature_cmake_test_trace_on "1")
else()
set(vt_feature_cmake_test_trace_on "0")
endif()

if (${vt_lb_enabled})
message(STATUS "Building VT with load balancing enabled")
message(STATUS "load balancing enabled")
set(vt_feature_cmake_lblite "1")
else()
message(STATUS "Building VT with load balancing disabled")
message(STATUS "load balancing disabled")
set(vt_feature_cmake_lblite "0")
endif()

if (${vt_trace_enabled})
message(STATUS "Building VT with tracing enabled")
message(STATUS "tracing enabled")
set(vt_feature_cmake_trace_enabled "1")
else()
message(STATUS "Building VT with tracing disabled")
message(STATUS "tracing disabled")
set(vt_feature_cmake_trace_enabled "0")
endif()

# This will be set to 1 during generation of cmake config for vt-trace target
set(vt_feature_cmake_trace_only "0")

if (${vt_priorities_enabled})
message(STATUS "Building VT with priorities enabled")
message(STATUS "priorities enabled")
message(
STATUS
"Building VT with priority bits per level: ${vt_priority_bits_per_level}"
"priority bits per level: ${vt_priority_bits_per_level}"
)
set(vt_feature_cmake_priorities "1")
else()
message(STATUS "Building VT with priorities disabled")
message(STATUS "priorities disabled")
set(vt_feature_cmake_priorities "0")
endif()

set(vt_feature_cmake_priority_bits_level "${vt_priority_bits_per_level}")

if (${vt_bit_check_overflow})
message(STATUS "Building VT with bit check overflow")
message(STATUS "bit check overflow")
set(vt_feature_cmake_bit_check_overflow "1")
else()
set(vt_feature_cmake_bit_check_overflow "0")
endif()

if (${vt_fcontext_enabled})
message(STATUS "Building VT with fcontext (ULT) enabled")
message(STATUS "fcontext (ULT) enabled")
set(vt_feature_cmake_fcontext "1")
else()
message(STATUS "Building VT with fcontext (ULT) disabled")
message(STATUS "fcontext (ULT) disabled")
set(vt_feature_cmake_fcontext "0")
endif()

if (${vt_mimalloc_enabled})
message(STATUS "Building VT with mimalloc enabled")
message(STATUS "mimalloc enabled")
set(vt_feature_cmake_mimalloc "1")
else()
message(STATUS "Building VT with mimalloc disabled")
message(STATUS "mimalloc disabled")
set(vt_feature_cmake_mimalloc "0")
endif()

Expand All @@ -104,76 +106,67 @@ else()
endif()

if ((vt_mpi_guards OR vt_trace_only) AND PERL_FOUND)
message(STATUS "Building VT with user MPI prevention guards enabled")
message(STATUS "user MPI prevention guards enabled")
set(vt_feature_cmake_mpi_access_guards "1")
elseif ((vt_mpi_guards OR vt_trace_only) AND NOT PERL_FOUND)
# No perl? Can't generate wrapper source file.
message(STATUS "Building VT with user MPI prevention guards disabled (requested, but perl not found)")
message(STATUS "user MPI prevention guards disabled (requested, but perl not found)")
set(vt_feature_cmake_mpi_access_guards "0")
else()
message(STATUS "Building VT with user MPI prevention guards disabled")
message(STATUS "user MPI prevention guards disabled")
set(vt_feature_cmake_mpi_access_guards "0")
endif()

option(vt_zoltan_enabled "Build VT with Zoltan" OFF)
if (vt_zoltan_enabled AND vt_zoltan_found)
message(STATUS "Building VT with zoltan enabled")
message(STATUS "zoltan enabled")
set(vt_feature_cmake_zoltan "1")
elseif (vt_zoltan_enabled AND NOT vt_zoltan_found)
message(STATUS "Building VT with zoltan disabled (requested, but Zoltan not found)")
message(STATUS "zoltan disabled (requested, but Zoltan not found)")
set(vt_feature_cmake_zoltan "0")
else()
message(STATUS "Building VT with zoltan disabled")
message(STATUS "zoltan disabled")
set(vt_feature_cmake_zoltan "0")
endif()

option(vt_ci_build "Build VT with CI mode on" OFF)
if(${vt_ci_build})
set(vt_feature_cmake_ci_build "1")
else()
set(vt_feature_cmake_ci_build "0")
endif()

if (LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release")
option(vt_debug_verbose "Build VT with verbose debug printing enabled" OFF)
else()
option(vt_debug_verbose "Build VT with verbose debug printing enabled" ON)
endif()

if(vt_debug_verbose)
message(STATUS "Building VT with verbose debug printing enabled")
message(STATUS "verbose debug printing enabled")
set(vt_feature_cmake_debug_verbose "1")
else()
message(STATUS "Building VT with verbose debug printing disabled")
message(STATUS "verbose debug printing disabled")
set(vt_feature_cmake_debug_verbose "0")
endif()

message(STATUS "CI_BUILD = ${vt_feature_cmake_ci_build}")

option(
vt_diagnostics_runtime_enabled
"Build VT with performance metrics/stats enabled at runtime by default" OFF
)
if (vt_diagnostics_enabled)
message(STATUS "Building VT with diagnostics (performance stats) enabled")
message(STATUS "diagnostics (performance stats) enabled")
set(vt_feature_cmake_diagnostics "1")

if (vt_diagnostics_runtime_enabled)
message(
STATUS
"Building VT with diagnostics (performance stats) enabled at runtime by default"
"diagnostics (performance stats) enabled at runtime by default"
)
set(vt_feature_cmake_diagnostics_runtime "1")
else()
message(
STATUS
"Building VT with diagnostics (performance stats) disabled at runtime by default"
"diagnostics (performance stats) disabled at runtime by default"
)
set(vt_feature_cmake_diagnostics_runtime "0")
endif()

else()
message(STATUS "Building VT with diagnostics (performance stats) disabled")
message(STATUS "diagnostics (performance stats) disabled")
set(vt_feature_cmake_diagnostics "0")
set(vt_feature_cmake_diagnostics_runtime "0")
endif()
Expand All @@ -183,10 +176,10 @@ option(
"Build VT with assertions and debug prints disabled" OFF
)
if (${vt_production_build_enabled})
message(STATUS "Building VT with assertions and debug prints disabled")
message(STATUS "assertions and debug prints disabled")
set(vt_feature_cmake_production_build "1")
else()
message(STATUS "Building VT with assertions and debug prints enabled")
message(STATUS "assertions and debug prints enabled")
set(vt_feature_cmake_production_build "0")
endif()

Expand All @@ -203,9 +196,20 @@ set (vt_feature_cmake_print_term_msgs "0")
set (vt_feature_cmake_no_pool_alloc_env "0")

if (${vt_pool_enabled})
message(STATUS "Building VT with memory pool enabled")
message(STATUS "memory pool enabled")
set (vt_feature_cmake_memory_pool "1")
else()
message(STATUS "Building VT with memory pool disabled")
message(STATUS "memory pool disabled")
set (vt_feature_cmake_memory_pool "0")
endif()

option(vt_ci_build "Build VT with CI mode on" OFF)
if(${vt_ci_build})
set(vt_feature_cmake_ci_build "1")
else()
set(vt_feature_cmake_ci_build "0")
endif()

list(POP_BACK CMAKE_MESSAGE_INDENT)

message(STATUS "CI_BUILD = ${vt_feature_cmake_ci_build}")

0 comments on commit 3d4b876

Please sign in to comment.