From c4cc9ff3c8a5a5afba9ab39a3a850cb999e97714 Mon Sep 17 00:00:00 2001 From: Artur Wojcik Date: Tue, 30 Jun 2026 14:57:03 +0200 Subject: [PATCH] Change option name to MIGRAPHX_USE_MSVC_STATIC_RUNTIME --- CMakeLists.txt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9abedabedd2..b8947e1c554 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,18 +62,6 @@ detect_package_backend() find_package(ROCmCMakeBuildTools REQUIRED) find_package(Threads REQUIRED) -include(CMakeDependentOption) - -cmake_dependent_option(MIGRAPHX_MSVC_STATIC_RUNTIME "Link MSVC runtime library statically instead of dynamically" OFF "WIN32" OFF) - -if(NOT MIGRAPHX_MSVC_STATIC_RUNTIME) - set(MIGRAPHX_MSVC_RUNTIME_SUFFIX "DLL") -endif() - -if(NOT CMAKE_MSVC_RUNTIME_LIBRARY) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>${MIGRAPHX_MSVC_RUNTIME_SUFFIX}") -endif() - if(CMAKE_SYSTEM_NAME STREQUAL "Windows") option(MIGRAPHX_USE_BINSKIM_COMPLIANT_COMPILE_FLAGS "Prepare MIGraphX for BinSkim Binary Analyzer" OFF) option(MIGRAPHX_USE_SPECTRE_MITIGATED_LIBRARIES "Use Spectre-mitigated libraries" OFF) @@ -97,6 +85,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") message(WARNING "Spectre-mitigated libraries are not yet available for Clang in this project.") endif() endif() + option(MIGRAPHX_USE_MSVC_STATIC_RUNTIME "Link MSVC runtime library statically instead of dynamically" OFF) + if(NOT MIGRAPHX_USE_MSVC_STATIC_RUNTIME) + set(MIGRAPHX_MSVC_RUNTIME_SUFFIX "DLL") + endif() + if(NOT CMAKE_MSVC_RUNTIME_LIBRARY) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>${MIGRAPHX_MSVC_RUNTIME_SUFFIX}") + endif() endif() option(MIGRAPHX_USE_ROCBLAS "Enable MIGraphX to use rocBLAS" ON)