In a CMakeLists.txt for C#, how do I enable nullable references?
In a CMakeLists.txt for a C# project, I can set the LangVersion for the project:
Why does cmake throw LNK2019 even though the proper .lib file is linked?
I’m trying to create an API wrapper for Discord’s GameSDK using Node’s addon api and cmake-js. My code makes calls to Discord’s libraries using their provided header files. However, I keep getting LNK2019 errors when trying to compile, even though the correct .lib file for my architecture is passed to the linker.
Get the default Toolset name for Visual Studio Generators in cMake
I have a cmake project for building a shared C++ library on Windows. There I would like to append the PlatformToolset information to the libraries file name.
How to properly generate a CMake project for Visual Studio
When I configure the CMake project with the Visual Studio generator it generates the Visual Studio solution. In the solution in the explorer I can see the CMakeLists.txt, and if it changes Visual Studio detects it, and asks to reload the entire solution, so far so good. However it doesn’t seem to be a proper CMake solution as you would get if you go to new project and select a new CMake project from Visual Studio itself. A whole bunch options are missing in the context menus when you right click:
How can I support building two platforms with cmake and seperate solutions?
With cmake, I am trying to create two Visual Studio 2022 solution that each support its own platform for an exe and lib. The first platform being x64, and the second being a second platform called “tools”.
How do I setup two platforms for an exe and lib using cmake?
With cmake, I am trying to create a Visual Studio 2022 solution that supports two platforms for an exe and lib. The first platform being x64, and the second being a second platform called “tools”.
Where is this address sanitizer command supposed to go?
In MSVC if I do this with address sanitizer turned on I get a runtime exception:
How can I replace the default /MTd with /MTd in cmake?
I am trying to have my exe use /MTd instead of the default /MTd, but when I generate my project, it will still have /MDd in the Code Generation and Command Line
when looking at the TestFlags
property page. I have tried both a string replace and a set for CMAKE_CXX_FLAGS_DEBUG
. Is there something that I am missing?