google / google/googletest

CMake generated projects with /MTd insteat of /MDd

Open
#4,145 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

On Windows - when generating gtest from source using CMake it generates the projects with /MTd instead of /MDd

The configuration by default is /MDd - please see screenshots below.

### Steps to reproduce the problem

Checkout git,
cd googletest
mkdir build
cd build
cmake-gui ..

The configuration is /DM and /MDd - as expected.

![image](https://user-images.githubusercontent.com/7355327/216834822-08e9d019-3a97-403a-bfbf-881528d676cc.png)

When openning the generated project the setings are /MTd instead of /MDd - which later breaks the code.

![image](https://user-images.githubusercontent.com/7355327/216835370-0ea15872-ab19-496e-9611-3e2dee62ed48.png)

### What version of GoogleTest are you using?

b72202078d0a7a2f2509eb5237685bcf1baea3b4

### What operating system and version are you using?

Windows11

### What compiler and version are you using?

Visual Studio 2022

### What build system are you using?

CMake 3.23.2

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the Windows build with CMake 3.23.2 and Visual Studio 2022 using the listed checkout, build directory, and cmake-gui steps. Compare the generated project's runtime-library setting with the CMake configuration, and consider the issue done when the generated project uses /MDd rather than /MTd.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.