mirror of https://github.com/mamba-org/mamba.git
Don't force MSVC_RUNTIME (#2861)
* Don't force MSVC_RUNTIME * Run micromamba-feedstock fork * Explicit MSVC runtime in CI * Fix typo
This commit is contained in:
parent
044824b6b2
commit
3c200f9e8e
|
@ -34,7 +34,10 @@ jobs:
|
|||
- name: Checkout micromamba-feedstock
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: conda-forge/micromamba-feedstock
|
||||
# Running a fork until we can merge the changes in micromamba-feedstock
|
||||
# https://github.com/conda-forge/micromamba-feedstock/pull/154
|
||||
repository: AntoinePrv/micromamba-feedstock
|
||||
ref: tmp-mamba-ci
|
||||
path: micromamba-feedstock
|
||||
- name: Clear micromamba-feedstock git directory
|
||||
run: rm -rf "micromamba-feedstock/.git"
|
||||
|
@ -131,6 +134,7 @@ jobs:
|
|||
-B build ^
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache ^
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=sccache ^
|
||||
-D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ^
|
||||
-D CMAKE_BUILD_TYPE="Release" ^
|
||||
-D BUILD_LIBMAMBA=ON ^
|
||||
-D BUILD_STATIC=ON ^
|
||||
|
|
|
@ -44,6 +44,7 @@ jobs:
|
|||
-G Ninja ^
|
||||
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
|
||||
-D CMAKE_BUILD_TYPE="Release" ^
|
||||
-D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" ^
|
||||
-D BUILD_LIBMAMBA_TESTS=ON ^
|
||||
-D BUILD_LIBMAMBA=ON ^
|
||||
-D BUILD_SHARED=ON ^
|
||||
|
@ -99,6 +100,7 @@ jobs:
|
|||
-G Ninja ^
|
||||
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
|
||||
-D CMAKE_BUILD_TYPE="Release" ^
|
||||
-D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" ^
|
||||
-D BUILD_LIBMAMBAPY=ON ^
|
||||
-D BUILD_LIBMAMBA=ON ^
|
||||
-D BUILD_SHARED=ON ^
|
||||
|
@ -180,6 +182,8 @@ jobs:
|
|||
cmake -B build/ ^
|
||||
-G Ninja ^
|
||||
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
|
||||
-D CMAKE_BUILD_TYPE="Release" ^
|
||||
-D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" ^
|
||||
-D BUILD_MICROMAMBA=ON ^
|
||||
-D BUILD_LIBMAMBA=ON ^
|
||||
-D BUILD_SHARED=ON ^
|
||||
|
|
|
@ -32,8 +32,12 @@ if (MSVC)
|
|||
# /external:I $ENV{CONDA_PREFIX}: consider the conda env prefix libraries headers as "external" to this project.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /DNOMINMAX /EHsc /Zc:__cplusplus /MP /experimental:external /external:I $ENV{CONDA_PREFIX}")
|
||||
# Force release mode to avoid debug libraries to be linked
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The build type")
|
||||
# add_definitions("-DUNICODE -D_UNICODE")
|
||||
set(
|
||||
CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
|
||||
CACHE STRING "MSVC runtime library"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Variants
|
||||
|
|
|
@ -431,7 +431,6 @@ macro(libmamba_create_target target_name linkage output_name)
|
|||
elseif (WIN32)
|
||||
|
||||
set(CMAKE_PREFIX_PATH "$ENV{VCPKG_ROOT}/installed/x64-windows-static/")
|
||||
set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
# For Windows we have a vcpkg based build system right now.
|
||||
find_package(LibArchive REQUIRED)
|
||||
|
|
|
@ -49,9 +49,6 @@ mamba_target_add_compile_warnings(mamba-package WARNING_AS_ERROR ${MAMBA_WARNING
|
|||
|
||||
if (${MAMBA_PACKAGE_LINKAGE} STREQUAL "STATIC")
|
||||
target_link_libraries(mamba-package PRIVATE libmamba-static)
|
||||
if (WIN32)
|
||||
set_target_properties(mamba-package PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif ()
|
||||
else ()
|
||||
target_link_libraries(mamba-package PRIVATE libmamba)
|
||||
endif ()
|
||||
|
|
|
@ -77,9 +77,6 @@ message(STATUS "Micromamba linkage: ${MICROMAMBA_LINKAGE}")
|
|||
|
||||
if (${MICROMAMBA_LINKAGE} STREQUAL "STATIC")
|
||||
target_link_libraries(micromamba PRIVATE libmamba-static)
|
||||
if (WIN32)
|
||||
set_target_properties(micromamba PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif ()
|
||||
else ()
|
||||
target_link_libraries(micromamba PRIVATE libmamba)
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue