diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index ff8a825aab..ea7cc27af5 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -12,7 +12,7 @@ ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) -if(LY_ENABLE_RAD_TELEMETRY) +if(LY_RAD_TELEMETRY_ENABLED) set(AZ_CORE_RADTELEMETRY_FILES ${common_dir}/azcore_profile_telemetry_files.cmake) set(AZ_CORE_RADTELEMETRY_PLATFORM_INCLUDES ${pal_dir}/profile_telemetry_platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) set(AZ_CORE_RADTELEMETRY_INCLUDE_DIRECTORIES ${common_dir}) diff --git a/Code/Framework/AzCore/Platform/Android/profile_telemetry_platform_android.cmake b/Code/Framework/AzCore/Platform/Android/profile_telemetry_platform_android.cmake index 5b74429383..df12777586 100644 --- a/Code/Framework/AzCore/Platform/Android/profile_telemetry_platform_android.cmake +++ b/Code/Framework/AzCore/Platform/Android/profile_telemetry_platform_android.cmake @@ -12,6 +12,6 @@ # is being avoided to prevent overriding functions declared in other targets platfrom # specific cmake files -if(LY_ENABLE_RAD_TELEMETRY) +if(LY_RAD_TELEMETRY_ENABLED) set(LY_COMPILE_DEFINITIONS PUBLIC AZ_PROFILE_TELEMETRY) endif() diff --git a/Code/Framework/AzCore/Platform/Mac/profile_telemetry_platform_mac.cmake b/Code/Framework/AzCore/Platform/Mac/profile_telemetry_platform_mac.cmake index 5b74429383..df12777586 100644 --- a/Code/Framework/AzCore/Platform/Mac/profile_telemetry_platform_mac.cmake +++ b/Code/Framework/AzCore/Platform/Mac/profile_telemetry_platform_mac.cmake @@ -12,6 +12,6 @@ # is being avoided to prevent overriding functions declared in other targets platfrom # specific cmake files -if(LY_ENABLE_RAD_TELEMETRY) +if(LY_RAD_TELEMETRY_ENABLED) set(LY_COMPILE_DEFINITIONS PUBLIC AZ_PROFILE_TELEMETRY) endif() diff --git a/Code/Framework/AzCore/Platform/Windows/profile_telemetry_platform_windows.cmake b/Code/Framework/AzCore/Platform/Windows/profile_telemetry_platform_windows.cmake index 5b74429383..df12777586 100644 --- a/Code/Framework/AzCore/Platform/Windows/profile_telemetry_platform_windows.cmake +++ b/Code/Framework/AzCore/Platform/Windows/profile_telemetry_platform_windows.cmake @@ -12,6 +12,6 @@ # is being avoided to prevent overriding functions declared in other targets platfrom # specific cmake files -if(LY_ENABLE_RAD_TELEMETRY) +if(LY_RAD_TELEMETRY_ENABLED) set(LY_COMPILE_DEFINITIONS PUBLIC AZ_PROFILE_TELEMETRY) endif() diff --git a/Code/Framework/AzCore/Platform/iOS/profile_telemetry_platform_ios.cmake b/Code/Framework/AzCore/Platform/iOS/profile_telemetry_platform_ios.cmake index 1a12c4b4e0..aeb91ebce6 100644 --- a/Code/Framework/AzCore/Platform/iOS/profile_telemetry_platform_ios.cmake +++ b/Code/Framework/AzCore/Platform/iOS/profile_telemetry_platform_ios.cmake @@ -6,6 +6,6 @@ # # -if(LY_ENABLE_RAD_TELEMETRY) +if(LY_RAD_TELEMETRY_ENABLED) set(LY_COMPILE_DEFINITIONS PUBLIC AZ_PROFILE_TELEMETRY) endif() diff --git a/Code/Framework/AzFramework/CMakeLists.txt b/Code/Framework/AzFramework/CMakeLists.txt index 8e80234263..8a68aac887 100644 --- a/Code/Framework/AzFramework/CMakeLists.txt +++ b/Code/Framework/AzFramework/CMakeLists.txt @@ -10,7 +10,7 @@ ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) -set(LY_ENABLE_STATISTICAL_PROFILING OFF CACHE BOOL "Enables statistical profiling when using AZ_PROFILE_SCOPE. If True, it takes effect only if RAD Telemetry is disabled.") +set(LY_STATISTICAL_PROFILING_ENABLED OFF CACHE BOOL "Enables statistical profiling when using AZ_PROFILE_SCOPE. If True, it takes effect only if RAD Telemetry is disabled.") set(LY_TOUCHBENDING_LAYER_BIT 63 CACHE STRING "Use TouchBending as the collision layer. The TouchBending layer can be a number from 1 to 63 (Default=63).") ly_add_target( @@ -38,7 +38,7 @@ ly_add_target( 3rdParty::lz4 ) -if(LY_ENABLE_STATISTICAL_PROFILING) +if(LY_STATISTICAL_PROFILING_ENABLED) ly_add_source_properties( SOURCES AzFramework/Debug/StatisticalProfilerProxy.h PROPERTY COMPILE_DEFINITIONS diff --git a/Code/Tools/TestImpactFramework/CMakeLists.txt b/Code/Tools/TestImpactFramework/CMakeLists.txt index 1fc59d1711..04cbee98dc 100644 --- a/Code/Tools/TestImpactFramework/CMakeLists.txt +++ b/Code/Tools/TestImpactFramework/CMakeLists.txt @@ -10,7 +10,9 @@ ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Platf include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) -if(${LY_TEST_IMPACT_ACTIVE} AND PAL_TRAIT_TEST_IMPACT_FRAMEWORK_SUPPORTED) - add_subdirectory(Runtime) - add_subdirectory(Frontend) +if(PAL_TRAIT_TEST_IMPACT_FRAMEWORK_SUPPORTED) + if(LY_TEST_IMPACT_INSTRUMENTATION_BIN) + add_subdirectory(Runtime) + add_subdirectory(Frontend) + endif() endif() diff --git a/Gems/AudioEngineWwise/Code/CMakeLists.txt b/Gems/AudioEngineWwise/Code/CMakeLists.txt index c6442df1ba..98a31fb91a 100644 --- a/Gems/AudioEngineWwise/Code/CMakeLists.txt +++ b/Gems/AudioEngineWwise/Code/CMakeLists.txt @@ -16,9 +16,6 @@ set(AUDIOENGINEWWISE_COMPILEDEFINITIONS ) find_package(Wwise MODULE) -if (NOT Wwise_FOUND) - message(STATUS "** Update the LY_WWISE_INSTALL_PATH cache variable if you intend to use Wwise.") -endif() ################################################################################ # Server / Unsupported diff --git a/Gems/MultiplayerCompression/Code/CMakeLists.txt b/Gems/MultiplayerCompression/Code/CMakeLists.txt index 405d92e683..f7494be3fd 100644 --- a/Gems/MultiplayerCompression/Code/CMakeLists.txt +++ b/Gems/MultiplayerCompression/Code/CMakeLists.txt @@ -6,8 +6,6 @@ # # -set(LY_ENABLE_MULTIPLAYER_COMPRESSION OFF CACHE BOOL "Enables usage of Multiplayer Compressor.") - ly_add_target( NAME MultiplayerCompression.Static STATIC NAMESPACE Gem diff --git a/Gems/RADTelemetry/Code/CMakeLists.txt b/Gems/RADTelemetry/Code/CMakeLists.txt index 3b65d6d47a..544540f273 100644 --- a/Gems/RADTelemetry/Code/CMakeLists.txt +++ b/Gems/RADTelemetry/Code/CMakeLists.txt @@ -6,8 +6,9 @@ # # -set(LY_ENABLE_RAD_TELEMETRY OFF CACHE BOOL "Enables RAD Telemetry in Debug/Profile mode.") -set(LY_RAD_TELEMETRY_INSTALL_ROOT "${LY_3RDPARTY_PATH}/RadTelemetry" CACHE PATH "Install path to RAD Telemetry.") +set(LY_RAD_TELEMETRY_ENABLED OFF CACHE BOOL "Enables RAD Telemetry in Debug/Profile mode.") +set(LY_RAD_TELEMETRY_INSTALL_ROOT "@LY_3RDPARTY_PATH@/RadTelemetry" CACHE PATH "Install path to RAD Telemetry.") +string(CONFIGURE ${LY_RAD_TELEMETRY_INSTALL_ROOT} LY_RAD_TELEMETRY_INSTALL_ROOT @ONLY) ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) diff --git a/cmake/3rdParty/FindWwise.cmake b/cmake/3rdParty/FindWwise.cmake index fa73ced3cc..8cd6db31dd 100644 --- a/cmake/3rdParty/FindWwise.cmake +++ b/cmake/3rdParty/FindWwise.cmake @@ -44,7 +44,7 @@ foreach(test_path ${WWISE_SDK_PATHS}) is_valid_sdk(${test_path} found_sdk) if(found_sdk) # Update the Wwise Install Path cache variable - set(LY_WWISE_INSTALL_PATH "${test_path}" CACHE PATH "Path to Wwise version ${WWISE_VERSION} installation." FORCE) + set(LY_WWISE_INSTALL_PATH "${test_path}") break() endif() endforeach() @@ -52,12 +52,10 @@ endforeach() if(NOT found_sdk) # If we don't find a path that appears to be a valid Wwise install, we can bail here. # No 3rdParty::Wwise target will exist, so that can be checked elsewhere. - message(STATUS "Wwise SDK version ${WWISE_VERSION} was not found.") return() -else() - message(STATUS "Using Wwise SDK at ${LY_WWISE_INSTALL_PATH}") endif() +message(STATUS "Using Wwise SDK at ${LY_WWISE_INSTALL_PATH}") set(WWISE_COMMON_LIB_NAMES # Core AK diff --git a/cmake/Deployment.cmake b/cmake/Deployment.cmake index ab18e3bfec..b6b7aa1869 100644 --- a/cmake/Deployment.cmake +++ b/cmake/Deployment.cmake @@ -9,6 +9,6 @@ # Define options that control the different options for deployment for target platforms set(LY_ASSET_DEPLOY_MODE "LOOSE" CACHE STRING "Set the Asset deployment when deploying to the target platform (LOOSE, PAK, VFS)") -set(LY_OVERRIDE_PAK_FOLDER_ROOT "" CACHE STRING "Optional root path to where Pak file folders are stored. By default, blank will use a predefined 'paks' root.") +set(LY_ASSET_OVERRIDE_PAK_FOLDER_ROOT "" CACHE STRING "Optional root path to where Pak file folders are stored. By default, blank will use a predefined 'paks' root.") diff --git a/cmake/EngineJson.cmake b/cmake/EngineJson.cmake index 180a6395b0..f175ff5a8b 100644 --- a/cmake/EngineJson.cmake +++ b/cmake/EngineJson.cmake @@ -10,7 +10,8 @@ include_guard() -set(LY_EXTERNAL_SUBDIRS "" CACHE STRING "List of subdirectories to recurse into when running cmake against the engine's CMakeLists.txt") +set(LY_EXTERNAL_SUBDIRS "" CACHE STRING "Additional list of subdirectory to recurse into via the cmake `add_subdirectory()` command. \ + The subdirectories are included after the restricted platform folders have been visited by a call to `add_subdirectory(restricted/\${restricted_platform})`") #! read_engine_external_subdirs # Read the external subdirectories from the engine.json file diff --git a/cmake/FileUtil.cmake b/cmake/FileUtil.cmake index 69a6ecc377..4607e14452 100644 --- a/cmake/FileUtil.cmake +++ b/cmake/FileUtil.cmake @@ -110,7 +110,7 @@ platform=${PAL_PLATFORM_NAME} game_projects=${LY_PROJECTS_TARGET_NAME} asset_deploy_mode=${LY_ASSET_DEPLOY_MODE} asset_deploy_type=${LY_ASSET_DEPLOY_ASSET_TYPE} -override_pak_root=${LY_OVERRIDE_PAK_FOLDER_ROOT} +override_pak_root=${LY_ASSET_OVERRIDE_PAK_FOLDER_ROOT} ") endfunction() diff --git a/cmake/O3DEJson.cmake b/cmake/O3DEJson.cmake index af55075fb8..daae3b4529 100644 --- a/cmake/O3DEJson.cmake +++ b/cmake/O3DEJson.cmake @@ -8,8 +8,6 @@ include_guard() -set(LY_EXTERNAL_SUBDIRS "" CACHE STRING "List of subdirectories to recurse into when running cmake against the engine's CMakeLists.txt") - #! read_json_external_subdirs # Read the "external_subdirectories" array from a *.json file # External subdirectories are any folders with CMakeLists.txt in them diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index d5663dadfb..7c62a4984c 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -6,11 +6,11 @@ # # -set(CPACK_WIX_ROOT "" CACHE PATH "Path to the WiX install path") +set(LY_INSTALLER_WIX_ROOT "" CACHE PATH "Path to the WiX install path") -if(CPACK_WIX_ROOT) - if(NOT EXISTS ${CPACK_WIX_ROOT}) - message(FATAL_ERROR "Invalid path supplied for CPACK_WIX_ROOT argument") +if(LY_INSTALLER_WIX_ROOT) + if(NOT EXISTS ${LY_INSTALLER_WIX_ROOT}) + message(FATAL_ERROR "Invalid path supplied for LY_INSTALLER_WIX_ROOT argument") endif() else() # early out as no path to WiX has been supplied effectively disabling support diff --git a/cmake/TestImpactFramework/LYTestImpactFramework.cmake b/cmake/TestImpactFramework/LYTestImpactFramework.cmake index 48bc5bf3df..61cc8c200a 100644 --- a/cmake/TestImpactFramework/LYTestImpactFramework.cmake +++ b/cmake/TestImpactFramework/LYTestImpactFramework.cmake @@ -6,11 +6,8 @@ # # -# Switch to enable/disable test impact analysis (and related build targets) -option(LY_TEST_IMPACT_ACTIVE "Enable test impact framework" OFF) - # Path to test instrumentation binary -option(LY_TEST_IMPACT_INSTRUMENTATION_BIN "Path to test impact framework instrumentation binary" OFF) +set(LY_TEST_IMPACT_INSTRUMENTATION_BIN "" CACHE PATH "Path to test impact framework instrumentation binary") # Name of test impact framework console static library target set(LY_TEST_IMPACT_CONSOLE_STATIC_TARGET "TestImpact.Frontend.Console.Static") @@ -213,9 +210,9 @@ function(ly_test_impact_extract_python_test_params COMPOSITE_TEST COMPOSITE_SUIT list(GET suite_components 2 test_timeout) # Get python script path relative to repo root ly_test_impact_rebase_file_to_repo_root( - ${script_path} + "${script_path}" script_path - ${LY_ROOT_FOLDER} + "${LY_ROOT_FOLDER}" ) set(suite_params "{ \"suite\": \"${test_suite}\", \"script\": \"${script_path}\", \"timeout\": ${test_timeout} }") list(APPEND test_suites "${suite_params}") @@ -259,7 +256,8 @@ function(ly_test_impact_write_test_enumeration_file TEST_ENUMERATION_TEMPLATE_FI ly_test_impact_extract_google_test_params(${test} "${test_params}" test_name test_suites) list(APPEND google_benchmarks " { \"name\": \"${test_name}\", \"launch_method\": \"${launch_method}\", \"suites\": [${test_suites}] }") else() - message("${test_name} is of unknown type (TEST_LIBRARY property is empty)") + ly_test_impact_extract_python_test_params(${test} "${test_params}" test_name test_suites) + message("${test_name} is of unknown type (TEST_LIBRARY property is \"${test_type}\")") list(APPEND unknown_tests " { \"name\": \"${test}\", \"type\": \"${test_type}\" }") endif() endforeach() @@ -440,7 +438,7 @@ endfunction() #! ly_test_impact_post_step: runs the post steps to be executed after all other cmake scripts have been executed. function(ly_test_impact_post_step) - if(NOT ${LY_TEST_IMPACT_ACTIVE}) + if(NOT LY_TEST_IMPACT_INSTRUMENTATION_BIN) return() endif() diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 0e8a6b8746..235e1406ab 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -132,7 +132,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_TEST_IMPACT_ACTIVE=1 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=!TEST_IMPACT_WIN_BINARY!", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=!TEST_IMPACT_WIN_BINARY!", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" @@ -328,7 +328,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DCPACK_WIX_ROOT=\"!WIX! \"", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DLY_INSTALLER_WIX_ROOT=\"!WIX! \"", "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://www.o3debinaries.org/license -DLY_INSTALLER_3RD_PARTY_LICENSE_URL=https://dkb1uj4hs9ikv.cloudfront.net/SPDX-Licenses.txt", "CPACK_BUCKET": "spectra-prism-staging-us-west-2", "CMAKE_LY_PROJECTS": "", diff --git a/scripts/ctest/CMakeLists.txt b/scripts/ctest/CMakeLists.txt index 45fded24ed..98ea21e938 100644 --- a/scripts/ctest/CMakeLists.txt +++ b/scripts/ctest/CMakeLists.txt @@ -42,5 +42,6 @@ ly_add_test( TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py -x ${CMAKE_CTEST_COMMAND} --build-path ${CMAKE_BINARY_DIR} + TEST_LIBRARY pytest )