From 547b6dd44ba93fa9f3a003c619446e77855cfd3f Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Thu, 16 Nov 2023 16:27:05 +0100 Subject: [PATCH 1/6] #2214: Move all CMake's options to configure_options.cmake file --- CMakeLists.txt | 43 +----- cmake/configure_options.cmake | 274 +++++++++++++--------------------- cmake/load_packages.cmake | 2 +- src/CMakeLists.txt | 11 -- 4 files changed, 111 insertions(+), 219 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c1e8e55c3..7a7dc8a88a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,8 +45,6 @@ if(NOT CMAKE_CXX_STANDARD) endif() message(STATUS "CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}") -option(CODE_COVERAGE "Enable coverage reporting" OFF) - set(MPI_EXTRA_FLAGS "" CACHE STRING "Flags to pass to mpirun/mpiexec") string(REPLACE " " ";" MPI_EXTRA_FLAGS_LIST "${MPI_EXTRA_FLAGS}") message(STATUS "Running tests and examples with additional MPI flags = ${MPI_EXTRA_FLAGS_LIST}") @@ -65,48 +63,19 @@ include(cmake/link_vt.cmake) include(cmake/load_packages.cmake) include(cmake/check_compiler.cmake) - -option(vt_gold_linker_enabled "Build VT using the `gold' linker" ON) - -option(vt_unity_build_enabled "Build VT with Unity/Jumbo mode enabled" OFF) - -if (vt_unity_build_enabled) - message(STATUS "Building VT in Unity/Jumbo build mode") -endif() - -# Option included here, handled in define_build_modes.cmake so libfort can be -# included correspondingly -option(vt_diagnostics_enabled "Build VT with performance metrics/stats" ON) - -if (vt_diagnostics_enabled) - # Default libfort ON if diagnostics are enabled - option(vt_libfort_enabled "Build VT with fort library enabled" ON) -else() - option(vt_libfort_enabled "Build VT with fort library enabled" OFF) -endif() - -option(vt_mimalloc_enabled "Build VT with mimalloc" OFF) -option(vt_mimalloc_static "Build VT with mimalloc using static linking" ON) -option(vt_asan_enabled "Build VT with address sanitizer" OFF) -option(vt_ubsan_enabled "Build VT with undefined behavior sanitizer" OFF) -option(vt_werror_enabled "Build VT with -Werror enabled" OFF) - include(cmake/nvcc_no_deprecated_gpu_targets.cmake) include(cmake/load_bundled_libraries.cmake) - -option(vt_trace_only "Build VT with trace-only mode enabled" OFF) -if (vt_trace_only) - message(STATUS "Building additional target for VT in trace-only mode") -endif() +include(cmake/configure_options.cmake) # Primary VT build add_subdirectory(src) +if(vt_no_color_enabled) + target_compile_definitions(${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC VT_NO_COLOR_ENABLED) +endif() # # Test prep - ensures examples can be registered as tests. # -option(VT_BUILD_TESTS "Build VT tests" ON) - if (VT_BUILD_TESTS AND "${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}") # CTest implies enable_testing() and defines the BUILD_TESTING option. @@ -118,8 +87,6 @@ endif() # # Tools # -option(vt_build_tools "Build VT tools" ON) - if (vt_build_tools) message( STATUS @@ -137,8 +104,6 @@ endif() # # Examples # -option(VT_BUILD_EXAMPLES "Build VT examples" ON) - if (VT_BUILD_EXAMPLES) message( STATUS diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 45a6e64105..2488d8165e 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -19,201 +19,139 @@ else() endif() list(REMOVE_DUPLICATES VT_CONFIG_TYPES) +# - option_name: The name of the option. +# - cmake_description: A descriptive message that is printed when the option is enabled or disabled. +# - option_description: A description of the option. This is used by the option() command for documentation purposes. +# - default_value: The default value of the option (ON or OFF). +# - cmake_var: The name of the CMake variable that will be set based on the option's value. +function (define_option option_name cmake_description option_description default_value cmake_var) + option(${option_name} "${option_description}" ${default_value}) + if(${option_name}) + set(${cmake_var} "1" CACHE INTERNAL "") + message(STATUS "${cmake_description} enabled") + else() + set(${cmake_var} "0" CACHE INTERNAL "") + message(STATUS "${cmake_description} disabled") + endif() +endfunction() + +########################################################################################################## + 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" OFF) -option( - vt_test_trace_runtime_enabled - "Build VT with runtime tracing enabled (for testing)" OFF +define_option(vt_lb_enabled "load balancing" "Build VT with load balancing enabled" ON vt_feature_cmake_lblite) +define_option(vt_trace_enabled "trace" "Build VT with trace enabled" OFF vt_feature_cmake_trace_enabled) +define_option(vt_trace_only "additional target for VT in trace-only mode" + "Build VT with additional target for VT in trace-only mode" OFF vt_feature_cmake_trace_only ) -option(vt_pool_enabled "Build VT with memory pool" ON) - -set( - vt_priority_bits_per_level 3 CACHE - STRING "Number of bits to use per VT priority level" +set(vt_priority_bits_per_level 3 CACHE + STRING "Number of bits to use per VT priority level" ) - -if (${vt_test_trace_runtime_enabled}) - 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 "load balancing enabled") - set(vt_feature_cmake_lblite "1") -else() - message(STATUS "load balancing disabled") - set(vt_feature_cmake_lblite "0") -endif() - -if (${vt_trace_enabled}) - message(STATUS "tracing enabled") - set(vt_feature_cmake_trace_enabled "1") -else() - 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 "priorities enabled") - message( - STATUS - "priority bits per level: ${vt_priority_bits_per_level}" - ) - set(vt_feature_cmake_priorities "1") -else() - message(STATUS "priorities disabled") - set(vt_feature_cmake_priorities "0") -endif() - set(vt_feature_cmake_priority_bits_level "${vt_priority_bits_per_level}") +define_option(vt_priorities_enabled + "priority bits per level: ${vt_priority_bits_per_level}" + "Build VT with message priorities enabled" OFF vt_feature_cmake_priorities +) +define_option(vt_test_trace_runtime_enabled + "runtime tracing enabled (for testing)" + "Build VT with runtime tracing enabled (for testing)" OFF vt_feature_cmake_test_trace_on +) +define_option(vt_pool_enabled "memory pool" "Build VT with memory pool" ON vt_feature_cmake_memory_pool) +define_option(vt_bit_check_overflow "bit check overflow" "Build VT with bit check overflow" + OFF vt_feature_cmake_bit_check_overflow +) +define_option(vt_fcontext_enabled "fcontext (ULT)" "Build VT with fcontext (ULT) enabled" + OFF vt_feature_cmake_fcontext +) +define_option(vt_mimalloc_enabled "mimalloc" "Build VT with fcontext (ULT) enabled" + OFF vt_feature_cmake_mimalloc +) -if (${vt_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 "fcontext (ULT) enabled") - set(vt_feature_cmake_fcontext "1") -else() - message(STATUS "fcontext (ULT) disabled") - set(vt_feature_cmake_fcontext "0") -endif() - -if (${vt_mimalloc_enabled}) - message(STATUS "mimalloc enabled") - set(vt_feature_cmake_mimalloc "1") -else() - message(STATUS "mimalloc disabled") - set(vt_feature_cmake_mimalloc "0") -endif() - -option(vt_mpi_guards "Build VT with poison MPI calls: code invoked from VT callbacks cannot invoke MPI functions" ON) - -if ((vt_mpi_guards OR vt_trace_only) AND PERL_FOUND) - 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) +if (vt_mpi_guards AND NOT PERL_FOUND) # No perl? Can't generate wrapper source file. - message(STATUS "user MPI prevention guards disabled (requested, but perl not found)") - set(vt_feature_cmake_mpi_access_guards "0") -else() - message(STATUS "user MPI prevention guards disabled") - set(vt_feature_cmake_mpi_access_guards "0") + message(STATUS "vt_mpi_guards=ON perl not found! Disabling user MPI prevention guards") + set(vt_mpi_guards OFF) endif() - -option(vt_zoltan_enabled "Build VT with Zoltan" OFF) -if (vt_zoltan_enabled AND vt_zoltan_found) - message(STATUS "zoltan enabled") - set(vt_feature_cmake_zoltan "1") -elseif (vt_zoltan_enabled AND NOT vt_zoltan_found) - message(STATUS "zoltan disabled (requested, but Zoltan not found)") - set(vt_feature_cmake_zoltan "0") -else() - message(STATUS "zoltan disabled") - set(vt_feature_cmake_zoltan "0") +if(vt_trace_only) + set(vt_mpi_guards ON) 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() +define_option(vt_mpi_guards "user MPI prevention guards" + "Build VT with poison MPI calls: code invoked from VT callbacks cannot invoke MPI functions" + ON vt_feature_cmake_mpi_access_guards +) -if(vt_debug_verbose) - message(STATUS "verbose debug printing enabled") - set(vt_feature_cmake_debug_verbose "1") -else() - message(STATUS "verbose debug printing disabled") - set(vt_feature_cmake_debug_verbose "0") +if(vt_zoltan_enabled AND NOT vt_zoltan_found) + message(STATUS "vt_zoltan_enabled=ON but Zoltan wasn't found!") + set(vt_zoltan_enabled OFF) endif() +define_option(vt_zoltan_enabled "Zoltan" "Build VT with Zoltan" OFF vt_feature_cmake_zoltan) -option(vt_rdma_tests_enabled "Build VT with RDMA tests enabled" ON) -if(vt_rdma_tests_enabled) - message(STATUS "RDMA tests enabled") - set(vt_feature_cmake_rdma_tests "1") +if(NOT LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release") + set(default_debug_verbose ON) else() - message(STATUS "RDMA tests disabled") - set(vt_feature_cmake_rdma_tests "0") + set(default_debug_verbose OFF) endif() +define_option(vt_debug_verbose "verbose debug printing" + "Build VT with verbose debug printing enabled" ${default_debug_verbose} vt_feature_cmake_debug_verbose +) +define_option(vt_rdma_tests_enabled "RDMA tests" "Build VT with RDMA tests enabled" + ON vt_feature_cmake_rdma_tests +) -option( - vt_diagnostics_runtime_enabled - "Build VT with performance metrics/stats enabled at runtime by default" OFF -) -if (vt_diagnostics_enabled) - message(STATUS "diagnostics (performance stats) enabled") - set(vt_feature_cmake_diagnostics "1") - - if (vt_diagnostics_runtime_enabled) - message( - STATUS - "diagnostics (performance stats) enabled at runtime by default" - ) - set(vt_feature_cmake_diagnostics_runtime "1") - else() - message( - STATUS - "diagnostics (performance stats) disabled at runtime by default" - ) - set(vt_feature_cmake_diagnostics_runtime "0") - endif() -else() - message(STATUS "diagnostics (performance stats) disabled") - set(vt_feature_cmake_diagnostics "0") - set(vt_feature_cmake_diagnostics_runtime "0") -endif() - -option( - vt_production_build_enabled - "Build VT with assertions and debug prints disabled" OFF +##################################################### +#################### DIAGNOSTICS #################### +##################################################### +define_option(vt_diagnostics_runtime_enabled "runtime performance metrics/stats" + "Build VT with performance metrics/stats enabled at runtime by default" + OFF vt_feature_cmake_diagnostics_runtime +) +define_option(vt_diagnostics_enabled "diagnostics (performance stats)" + "Build VT with performance metrics/stats" OFF vt_feature_cmake_diagnostics +) +define_option(vt_libfort_enabled "libfort" "Build VT with fort library enabled" + ${vt_diagnostics_enabled} vt_feature_cmake_libfort ) -if (${vt_production_build_enabled}) - message(STATUS "assertions and debug prints disabled") - set(vt_feature_cmake_production_build "1") -else() - message(STATUS "assertions and debug prints enabled") - set(vt_feature_cmake_production_build "0") -endif() -if (vt_libfort_enabled) - set(vt_feature_cmake_libfort "1") -else() - set(vt_feature_cmake_libfort "0") +if (NOT vt_diagnostics_enabled) + set(vt_feature_cmake_diagnostics_runtime "0") endif() -set(vt_feature_cmake_no_feature "0") +##################################################### +define_option(vt_production_build_enabled "production build" + "Build VT with assertions and debug prints disabled" OFF vt_feature_cmake_production_build +) +set (vt_feature_cmake_no_feature "0") set (vt_feature_cmake_mpi_rdma "0") set (vt_feature_cmake_print_term_msgs "0") set (vt_feature_cmake_no_pool_alloc_env "0") -if (${vt_pool_enabled}) - message(STATUS "memory pool enabled") - set (vt_feature_cmake_memory_pool "1") -else() - message(STATUS "memory pool disabled") - set (vt_feature_cmake_memory_pool "0") -endif() +define_option(vt_ci_build "CI build" + "Build VT with CI mode on" OFF vt_feature_cmake_ci_build +) -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() +define_option(vt_no_color_enabled "--vt_no_color set to true by default" + "Build VT with option --vt_no_color set to true by default" OFF empty_feature +) + +define_option(CODE_COVERAGE "code coverage" "Enable coverage reporting" OFF empty_feature) +define_option(vt_gold_linker_enabled "`gold' linker" "Build VT using the `gold' linker" ON empty_feature) +define_option(vt_unity_build_enabled "unity build" "Build VT with Unity/Jumbo mode enabled" OFF empty_feature) +define_option(vt_mimalloc_enabled "mimalloc" "Build VT with mimalloc" OFF empty_feature) +define_option(vt_mimalloc_static "mimalloc using static linking" "Build VT with mimalloc using static linking" + ON empty_feature +) +define_option(vt_asan_enabled "address sanitizer" "Build VT with address sanitizer" OFF empty_feature) +define_option(vt_ubsan_enabled "undefined behavior sanitizer" "Build VT with undefined behavior sanitizer" + OFF empty_feature +) +define_option(vt_werror_enabled "-Werror" "Build VT with -Werror enabled" OFF empty_feature) +define_option(VT_BUILD_TESTS "tests" "Build VT tests" ON empty_feature) +define_option(vt_build_tools "tools" "Build VT tools" ON empty_feature) +define_option(VT_BUILD_EXAMPLES "examples" "Build VT examples" ON empty_feature) list(POP_BACK CMAKE_MESSAGE_INDENT) -message(STATUS "CI_BUILD = ${vt_feature_cmake_ci_build}") +########################################################################################################## diff --git a/cmake/load_packages.cmake b/cmake/load_packages.cmake index 01c60990e4..897766ae14 100644 --- a/cmake/load_packages.cmake +++ b/cmake/load_packages.cmake @@ -10,7 +10,7 @@ include(cmake/load_mpi_package.cmake) include(cmake/load_zlib_package.cmake) # Discover and load threading configuration -include(cmake/load_threading_package.cmake) +# include(cmake/load_threading_package.cmake) # Perl is used to build the PMPI wrappers find_package(Perl) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 90ca6f78f8..878c5cf242 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -173,9 +173,6 @@ foreach(SUB_DIR ${PROJECT_SUBDIRS_LIST}) ) endforeach() - -include(../cmake/configure_options.cmake) - # Generate PMPI wrappers, if enabled and possible. if((vt_mpi_guards OR vt_trace_only) AND PERL_FOUND) set(MPI_WRAP_GENERATED "${PROJECT_BIN_DIR}/src/vt/pmpi/generated/mpiwrap.cc") @@ -207,14 +204,6 @@ add_library( include(${CMAKE_CURRENT_LIST_DIR}/../cmake/build_git_info.cmake) -option(vt_no_color_enabled "Build VT with option --vt_no_color set to true by default" OFF) -if(vt_no_color_enabled) - message(STATUS "Building VT with --vt_no_color set to true by default") - target_compile_definitions(${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC VT_NO_COLOR_ENABLED) -else() - message(STATUS "Building VT with --vt_no_color set to false by default") -endif() - target_compile_features( ${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC cxx_std_17 From 19a57780e19fd6a97c5414a64073cb4e3cb45fa6 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Fri, 17 Nov 2023 12:12:25 +0100 Subject: [PATCH 2/6] #2214: Fix issue with vt_trace_only feature leaking into main vt library --- cmake/configure_options.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 2488d8165e..4f1d91b3b5 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -44,6 +44,9 @@ define_option(vt_trace_enabled "trace" "Build VT with trace enabled" OFF vt_feat define_option(vt_trace_only "additional target for VT in trace-only mode" "Build VT with additional target for VT in trace-only mode" OFF vt_feature_cmake_trace_only ) +# This will be changed back to "1" for vt-trace config file +set(vt_feature_cmake_trace_only "0") + set(vt_priority_bits_per_level 3 CACHE STRING "Number of bits to use per VT priority level" ) From ecfea5f313bee9e3b705685972be95ee465cb333 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Fri, 17 Nov 2023 12:55:23 +0100 Subject: [PATCH 3/6] #2214: Make sure to include configure_options.cmake after gathering information about TPLs --- CMakeLists.txt | 5 ++++- cmake/configure_options.cmake | 6 +----- cmake/load_packages.cmake | 3 --- cmake/load_threading_package.cmake | 18 ------------------ 4 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 cmake/load_threading_package.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a7dc8a88a..3271b0b7da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,10 +62,13 @@ include(cmake/link_vt.cmake) # Load packages that are required for core VT build include(cmake/load_packages.cmake) +# Some options use TPL information (whether Perl was found etc.) +include(cmake/configure_options.cmake) + include(cmake/check_compiler.cmake) include(cmake/nvcc_no_deprecated_gpu_targets.cmake) include(cmake/load_bundled_libraries.cmake) -include(cmake/configure_options.cmake) + # Primary VT build add_subdirectory(src) diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 4f1d91b3b5..129718b70a 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -56,7 +56,7 @@ define_option(vt_priorities_enabled "Build VT with message priorities enabled" OFF vt_feature_cmake_priorities ) define_option(vt_test_trace_runtime_enabled - "runtime tracing enabled (for testing)" + "runtime tracing (for testing)" "Build VT with runtime tracing enabled (for testing)" OFF vt_feature_cmake_test_trace_on ) define_option(vt_pool_enabled "memory pool" "Build VT with memory pool" ON vt_feature_cmake_memory_pool) @@ -84,10 +84,6 @@ define_option(vt_mpi_guards "user MPI prevention guards" ON vt_feature_cmake_mpi_access_guards ) -if(vt_zoltan_enabled AND NOT vt_zoltan_found) - message(STATUS "vt_zoltan_enabled=ON but Zoltan wasn't found!") - set(vt_zoltan_enabled OFF) -endif() define_option(vt_zoltan_enabled "Zoltan" "Build VT with Zoltan" OFF vt_feature_cmake_zoltan) if(NOT LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release") diff --git a/cmake/load_packages.cmake b/cmake/load_packages.cmake index 897766ae14..7bf97150c9 100644 --- a/cmake/load_packages.cmake +++ b/cmake/load_packages.cmake @@ -9,9 +9,6 @@ include(cmake/load_mpi_package.cmake) # ZLIB package include(cmake/load_zlib_package.cmake) -# Discover and load threading configuration -# include(cmake/load_threading_package.cmake) - # Perl is used to build the PMPI wrappers find_package(Perl) diff --git a/cmake/load_threading_package.cmake b/cmake/load_threading_package.cmake deleted file mode 100644 index 8b5e5e1c36..0000000000 --- a/cmake/load_threading_package.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -# Load and discover threading settings -# - -# Threading build configuration -option(vt_fcontext_enabled "Build VT with fcontext (ULT) enabled" OFF) - -if(vt_fcontext_enabled) - message( - STATUS - "Using fcontext for worker threading" - ) -else() - message( - STATUS - "Threading disabled" - ) -endif() From 3b84d2e1debd75768733cb73b7e320f64c9fde63 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Fri, 17 Nov 2023 13:33:15 +0100 Subject: [PATCH 4/6] #2214: Change uppercase vt related CMake variables to lowercase --- CMakeLists.txt | 10 +++++----- ci/azure/azure-clang-10-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-11-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-12-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-13-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-14-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-9-ubuntu-mpich.yml | 2 +- ci/azure/azure-clang-alpine-mpich.yml | 2 +- ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml | 2 +- ci/azure/azure-gcc-10-ubuntu-openmpi.yml | 2 +- ci/azure/azure-gcc-11-ubuntu-mpich.yml | 2 +- ci/azure/azure-gcc-12-ubuntu-mpich.yml | 2 +- ci/azure/azure-gcc-8-ubuntu-mpich.yml | 2 +- ci/azure/azure-gcc-9-ubuntu-mpich.yml | 2 +- ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml | 2 +- ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml | 2 +- ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml | 2 +- ci/azure/azure-nvidia-12-ubuntu-mpich.yml | 2 +- ci/build_cpp.sh | 2 +- ci/build_vt_sample.sh | 4 ++-- ci/ctest_job_script.cmake | 6 +++--- ci/test_cpp.sh | 2 +- cmake/configure_options.cmake | 6 +++--- docker-compose.yml | 4 ++-- docs/md/building.md | 8 ++++---- scripts/workflow-azure-template.yml | 2 +- scripts/workflows-azure.ini | 4 ++-- src/CMakeLists.txt | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3271b0b7da..9b24765221 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ endif() # # Test prep - ensures examples can be registered as tests. # -if (VT_BUILD_TESTS +if (vt_build_tests AND "${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}") # CTest implies enable_testing() and defines the BUILD_TESTING option. # The default of BUILD_TESTING is ON. @@ -107,7 +107,7 @@ endif() # # Examples # -if (VT_BUILD_EXAMPLES) +if (vt_build_examples) message( STATUS "VT: building examples" @@ -117,7 +117,7 @@ if (VT_BUILD_EXAMPLES) add_subdirectory(examples) else() message( - STATUS "VT: NOT building examples because VT_BUILD_EXAMPLES is not set.\ + STATUS "VT: NOT building examples because vt_build_examples is not set.\ Examples that are not built are NOT TESTED." ) endif() @@ -127,7 +127,7 @@ endif() # if (BUILD_TESTING - AND VT_BUILD_TESTS + AND vt_build_tests AND CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) message( STATUS @@ -140,7 +140,7 @@ if (BUILD_TESTING else() message( STATUS - "VT: NOT building tests because VT_BUILD_TESTS or BUILD_TESTING are not set" + "VT: NOT building tests because vt_build_tests or BUILD_TESTING are not set" ) endif() diff --git a/ci/azure/azure-clang-10-ubuntu-mpich.yml b/ci/azure/azure-clang-10-ubuntu-mpich.yml index 4d2da30753..158c3674ae 100644 --- a/ci/azure/azure-clang-10-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-10-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-10 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-11-ubuntu-mpich.yml b/ci/azure/azure-clang-11-ubuntu-mpich.yml index bf5f747623..ce3d337b8f 100644 --- a/ci/azure/azure-clang-11-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-11-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-11 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-12-ubuntu-mpich.yml b/ci/azure/azure-clang-12-ubuntu-mpich.yml index 8e59239236..102af8d15c 100644 --- a/ci/azure/azure-clang-12-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-12-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-12 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-13-ubuntu-mpich.yml b/ci/azure/azure-clang-13-ubuntu-mpich.yml index fc007e171e..390f04178a 100644 --- a/ci/azure/azure-clang-13-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-13-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-13 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-14-ubuntu-mpich.yml b/ci/azure/azure-clang-14-ubuntu-mpich.yml index 70974b97e9..4620d628b0 100644 --- a/ci/azure/azure-clang-14-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-14-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-14 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-9-ubuntu-mpich.yml b/ci/azure/azure-clang-9-ubuntu-mpich.yml index cd9a9682ef..4219a637e0 100644 --- a/ci/azure/azure-clang-9-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-9-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-9 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-clang-alpine-mpich.yml b/ci/azure/azure-clang-alpine-mpich.yml index 16825fa438..8a76770e33 100644 --- a/ci/azure/azure-clang-alpine-mpich.yml +++ b/ci/azure/azure-clang-alpine-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: clang-13 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml index ed372f85a9..dd4bc50a05 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml @@ -22,7 +22,7 @@ variables: HOST_COMPILER: gcc-10 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 0 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml index 20af8f6ec5..e29721e78d 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-10 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 0 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-gcc-11-ubuntu-mpich.yml b/ci/azure/azure-gcc-11-ubuntu-mpich.yml index 63d5459d2a..e11fec7232 100644 --- a/ci/azure/azure-gcc-11-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-11-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-11 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 1 + VT_CODE_COVERAGE: 1 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 1 diff --git a/ci/azure/azure-gcc-12-ubuntu-mpich.yml b/ci/azure/azure-gcc-12-ubuntu-mpich.yml index 012dbfcb87..2187c26b7c 100644 --- a/ci/azure/azure-gcc-12-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-12-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-12 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-gcc-8-ubuntu-mpich.yml b/ci/azure/azure-gcc-8-ubuntu-mpich.yml index d51174e4b1..4bb75fb294 100644 --- a/ci/azure/azure-gcc-8-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-8-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-8 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-gcc-9-ubuntu-mpich.yml b/ci/azure/azure-gcc-9-ubuntu-mpich.yml index 83d8caa653..ae2db9107c 100644 --- a/ci/azure/azure-gcc-9-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-9-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-9 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml index 7b145b58b3..4390ba7cbb 100644 --- a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: icpc BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 0 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml index 94e2412679..3e8ebcd202 100644 --- a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: icpx BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml index 2bfa9bb518..1f4a0d3660 100644 --- a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-9 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 0 diff --git a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml index eda3ae73d3..43465d1794 100644 --- a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -31,7 +31,7 @@ variables: HOST_COMPILER: gcc-9 BUILD_TYPE: release ULIMIT_CORE: 0 - CODE_COVERAGE: 0 + VT_CODE_COVERAGE: 0 VT_LB: 1 VT_TRACE: 1 VT_TRACE_RT: 0 diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index dc60d1d320..e49bf2901f 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -109,7 +109,7 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \ -Dvt_fcontext_enabled="${VT_FCONTEXT_ENABLED:-0}" \ -Dvt_fcontext_build_tests_examples="${VT_FCONTEXT_BUILD_TESTS_EXAMPLES:-0}" \ -Dvt_rdma_tests_enabled="${VT_RDMA_TESTS_ENABLED:-1}" \ - -DCODE_COVERAGE="${CODE_COVERAGE:-0}" \ + -Dvt_code_coverage="${VT_CODE_COVERAGE:-0}" \ -DMI_INTERPOSE:BOOL=ON \ -DMI_OVERRIDE:BOOL=ON \ -Dvt_mpi_guards="${VT_MPI_GUARD_ENABLED:-0}" \ diff --git a/ci/build_vt_sample.sh b/ci/build_vt_sample.sh index 68d6fcd574..b3f6d54f76 100755 --- a/ci/build_vt_sample.sh +++ b/ci/build_vt_sample.sh @@ -48,8 +48,8 @@ then -Dkokkos_DISABLE:BOOL=1 \ -Dkokkos_kernels_DISABLE:BOOL=1 \ -Dvt_trace_only="1" \ - -DVT_BUILD_EXAMPLES="0" \ - -DVT_BUILD_TESTS="0" \ + -Dvt_build_examples="0" \ + -Dvt_build_tests="0" \ -DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-17}" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" \ diff --git a/ci/ctest_job_script.cmake b/ci/ctest_job_script.cmake index b6d354dc2f..7743af4d84 100644 --- a/ci/ctest_job_script.cmake +++ b/ci/ctest_job_script.cmake @@ -83,8 +83,8 @@ endif() if ( NOT DEFINED ENV{VT_RDMA_TESTS_ENABLED} ) set(ENV{VT_RDMA_TESTS_ENABLED} "1") endif() -if ( NOT DEFINED ENV{CODE_COVERAGE} ) - set(ENV{CODE_COVERAGE} "0") +if ( NOT DEFINED ENV{VT_CODE_COVERAGE} ) + set(ENV{VT_CODE_COVERAGE} "0") endif() if ( NOT DEFINED ENV{VT_MPI_GUARD_ENABLED} ) set(ENV{VT_MPI_GUARD_ENABLED} "0") @@ -137,7 +137,7 @@ set(configureOpts "-Dvt_fcontext_enabled=$ENV{VT_FCONTEXT_ENABLED}" "-Dvt_fcontext_build_tests_examples=$ENV{VT_FCONTEXT_BUILD_TESTS_EXAMPLES}" "-Dvt_rdma_tests_enabled=$ENV{VT_RDMA_TESTS_ENABLED}" - "-DCODE_COVERAGE=$ENV{CODE_COVERAGE}" + "-Dvt_code_coverage=$ENV{VT_CODE_COVERAGE}" "-DMI_INTERPOSE:BOOL=ON" "-DMI_OVERRIDE:BOOL=ON" "-Dvt_mpi_guards=$ENV{VT_MPI_GUARD_ENABLED}" diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index f5972e5199..461505b71c 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -12,7 +12,7 @@ pushd "$VT_BUILD" # Don't run performance tests here (use label 'unit_test' or 'example') ctest --output-on-failure -L 'unit_test|example' | tee cmake-output.log -if test "${CODE_COVERAGE:-0}" -eq 1 +if test "${VT_CODE_COVERAGE:-0}" -eq 1 then export CODECOV_TOKEN="$CODECOV_TOKEN" lcov --capture --directory . --output-file coverage.info diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 129718b70a..8c8057b49e 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -135,7 +135,7 @@ define_option(vt_no_color_enabled "--vt_no_color set to true by default" "Build VT with option --vt_no_color set to true by default" OFF empty_feature ) -define_option(CODE_COVERAGE "code coverage" "Enable coverage reporting" OFF empty_feature) +define_option(vt_code_coverage "code coverage" "Enable coverage reporting" OFF empty_feature) define_option(vt_gold_linker_enabled "`gold' linker" "Build VT using the `gold' linker" ON empty_feature) define_option(vt_unity_build_enabled "unity build" "Build VT with Unity/Jumbo mode enabled" OFF empty_feature) define_option(vt_mimalloc_enabled "mimalloc" "Build VT with mimalloc" OFF empty_feature) @@ -147,9 +147,9 @@ define_option(vt_ubsan_enabled "undefined behavior sanitizer" "Build VT with und OFF empty_feature ) define_option(vt_werror_enabled "-Werror" "Build VT with -Werror enabled" OFF empty_feature) -define_option(VT_BUILD_TESTS "tests" "Build VT tests" ON empty_feature) +define_option(vt_build_tests "tests" "Build VT tests" ON empty_feature) define_option(vt_build_tools "tools" "Build VT tools" ON empty_feature) -define_option(VT_BUILD_EXAMPLES "examples" "Build VT examples" ON empty_feature) +define_option(VT_build_examples "examples" "Build VT examples" ON empty_feature) list(POP_BACK CMAKE_MESSAGE_INDENT) diff --git a/docker-compose.yml b/docker-compose.yml index d02d516a16..4f6a9312bf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ # VT_DIAGNOSTICS=1 # Build with diagnostics enabled # VT_DIAGNOSTICS_RUNTIME=0 # Enable diagnostics collection at runtime by default # BUILD_TYPE=release # CMake build type -# CODE_COVERAGE=0 # Enable generation of code coverage reports +# VT_CODE_COVERAGE=0 # Enable generation of code coverage reports # VT_DEBUG_VERBOSE # Enable verbose debug prints at compile-time # VT_NO_COLOR_ENABLED=0 # Set --vt_no_color flag to true by default # VT_BUILD_SHARED_LIBS=0 # Build VT as shared library @@ -153,7 +153,7 @@ x-vtopts: &vtopts CMAKE_BUILD_TYPE: ${BUILD_TYPE:-release} VT_MPI_GUARD_ENABLED: ${VT_MPI_GUARD:-1} VT_EXTENDED_TESTS_ENABLED: ${VT_EXTENDED_TESTS:-1} - CODE_COVERAGE: ${CODE_COVERAGE:-0} + VT_CODE_COVERAGE: ${VT_CODE_COVERAGE:-0} https_proxy: ${PROXY-} http_proxy: ${PROXY-} LSAN_OPTIONS: ${LSAN_OPTIONS-} diff --git a/docs/md/building.md b/docs/md/building.md index 4669cbfbee..ee09a39c59 100644 --- a/docs/md/building.md +++ b/docs/md/building.md @@ -57,9 +57,9 @@ build configuration: | `vt_unity_build_enabled` | 0 | Build with Unity/Jumbo mode enabled (requires CMake >= 3.16) | | `vt_fcontext_enabled` | 0 | Force use of fcontext for threading | | `vt_tests_num_nodes` | - | Maximum number of nodes used for tests. If empty, then the default value detected by CMake is used | -| `CODE_COVERAGE` | 0 | Enable code coverage for VT examples/tests | -| `VT_BUILD_TESTS` | 1 | Build all VT tests | -| `VT_BUILD_EXAMPLES` | 1 | Build all VT examples | +| `vt_code_coverage` | 0 | Enable code coverage for VT examples/tests | +| `vt_build_tests` | 1 | Build all VT tests | +| `VT_build_examples` | 1 | Build all VT examples | | `vt_debug_verbose` | 1 (not Release) | Enable VT verbose debug prints at compile-time | | `vt_no_color_enabled` | 0 | Set `--vt_no_color` flag to true by default | | `BUILD_SHARED_LIBS` | 0 | Build VT as shared library | @@ -163,7 +163,7 @@ which `docker-compose` will read. # VT_DIAGNOSTICS=1 # Build with diagnostics enabled # VT_DIAGNOSTICS_RUNTIME=0 # Enable diagnostics at runtime by default # BUILD_TYPE=release # CMake build type -# CODE_COVERAGE=0 # Enable generation of code coverage reports +# VT_CODE_COVERAGE=0 # Enable generation of code coverage reports # VT_DEBUG_VERBOSE # Enable verbose debug prints at compile-time # VT_NO_COLOR_ENABLED=0 # Set --vt_no_color flag to true by default # VT_BUILD_SHARED_LIBS=0 # Build VT as shared library diff --git a/scripts/workflow-azure-template.yml b/scripts/workflow-azure-template.yml index d09c15a393..aa4a566cb2 100644 --- a/scripts/workflow-azure-template.yml +++ b/scripts/workflow-azure-template.yml @@ -19,7 +19,7 @@ variables: HOST_COMPILER: [% IF host_compiler %][% host_compiler %][% ELSE %][% compiler %][% END %] BUILD_TYPE: [% build_type %] ULIMIT_CORE: [% ulimit_core %] - CODE_COVERAGE: [% code_coverage %] + VT_CODE_COVERAGE: [% vt_code_coverage %] VT_LB: [% vt_lb %] VT_TRACE: [% vt_trace %] VT_TRACE_RT: [% vt_trace_rt %] diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index 01515b5c9e..0588b8a7f2 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -19,7 +19,7 @@ vt_ci_build = 1 vt_tests_num_nodes = 2 test_lb_schema = 0 ulimit_core = 0 -code_coverage = 0 +vt_code_coverage = 0 build_type = release repo = lifflander1/vt arch = amd64 @@ -127,7 +127,7 @@ distro = 22.04 vt_trace = 1 vt_trace_rt = 1 vt_unity_build = 0 -code_coverage = 1 +vt_code_coverage = 1 docker_target = "[% linux %]-cpp-clean-noinstall" output_name = ci/azure/azure-gcc-11-ubuntu-mpich.yml diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 878c5cf242..233cf54d7e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -259,7 +259,7 @@ target_include_directories( $ ) -if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +if(VT_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") message(STATUS "VT: enabling code coverage generation") # Add required flags (GCC & LLVM/Clang) target_compile_options(${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC From 637b34c42dbf1a8e9bae7ebdd1f5f538efd0a995 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Mon, 20 Nov 2023 14:06:11 +0100 Subject: [PATCH 5/6] #2214: Use correct code_coverage variable in CMake --- cmake/configure_options.cmake | 2 +- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 8c8057b49e..5340d5aacf 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -149,7 +149,7 @@ define_option(vt_ubsan_enabled "undefined behavior sanitizer" "Build VT with und define_option(vt_werror_enabled "-Werror" "Build VT with -Werror enabled" OFF empty_feature) define_option(vt_build_tests "tests" "Build VT tests" ON empty_feature) define_option(vt_build_tools "tools" "Build VT tools" ON empty_feature) -define_option(VT_build_examples "examples" "Build VT examples" ON empty_feature) +define_option(vt_build_examples "examples" "Build VT examples" ON empty_feature) list(POP_BACK CMAKE_MESSAGE_INDENT) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 233cf54d7e..39c3b57a64 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -259,7 +259,7 @@ target_include_directories( $ ) -if(VT_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +if(${vt_code_coverage} AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") message(STATUS "VT: enabling code coverage generation") # Add required flags (GCC & LLVM/Clang) target_compile_options(${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC From e39f3b76a1d207ec4f4a4034271addaa7d4a24e8 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 28 Nov 2023 21:59:42 +0100 Subject: [PATCH 6/6] #2214: Fix typo --- docs/md/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/md/building.md b/docs/md/building.md index ee09a39c59..e34db71dae 100644 --- a/docs/md/building.md +++ b/docs/md/building.md @@ -59,7 +59,7 @@ build configuration: | `vt_tests_num_nodes` | - | Maximum number of nodes used for tests. If empty, then the default value detected by CMake is used | | `vt_code_coverage` | 0 | Enable code coverage for VT examples/tests | | `vt_build_tests` | 1 | Build all VT tests | -| `VT_build_examples` | 1 | Build all VT examples | +| `vt_build_examples` | 1 | Build all VT examples | | `vt_debug_verbose` | 1 (not Release) | Enable VT verbose debug prints at compile-time | | `vt_no_color_enabled` | 0 | Set `--vt_no_color` flag to true by default | | `BUILD_SHARED_LIBS` | 0 | Build VT as shared library |