Configuring an Intel compiler from MSVC 2019 built-in CMake - cmake

Recent Visual Studio versions support CMake natively, with documentation for compilation with MSVC, Clang, and for linux. However, there is no official documentation for configuring the Intel compiler.
What is the best way to configure the Intel compiler using Visual Studio's native CMake? Can I create a custom environment?
I found one forum post that attempts to solve the problem, but it relies on the Windows CLI to launch Visual Studio. I've also submitted a feature request for native CMake support for the Intel C/C++ compiler within Visual Studio.

Related

Building a project using CMake and Clang from the LLVM SDK on Windows

On Windows when invoking cmake with -G Visual Studio 17 2022 -T ClangCL the Visual Studio project will use the version of the Clang toolchain that comes packaged with Visual Studio.
How can cmake instead be configured to generate a Visual Studio project that will specifically use the version of the Clang toolchain that can be installed via the LLVM SDK?

How to target Windows XP with MSVC2017 and CMake?

I wanted to accomplish what other 2 threads are doing, but with latest MSVC to support targetting Windows XP and CMake support.
I keep following the advice given in How can I generate a Visual Studio 2012 project targeting Windows XP with CMake? and How does CMake specify "Platform Toolset" for a Visual Studio 2015 project? but CMake keeps telling me that it configured the source code for Windows 10.foo.bar SDK version which is not going to work. I tried hamfisting v141_xp into the project as CMAKE_GENERATOR_TOOLSET and -T parameter for cmake but it all ultimately fails. How can I accomplish this? And if possible, where can I specify this in CMakeSettings.json?
Bonus points for amd64 support, since the target system I want to make binaries for is Windows XP x64.
For what it's worth, I have tried to open a .sln file and I confirm that v141_xp is available as a platform toolset.
I figured it out on my own. From x64 tools console:
Prepare .sln files
cmake path/to/CMakeLists.txt -G "Visual Studio 15 2017 Win64" -A x64 -T v141_xp
Build from .sln:
msbuild path/to/.sln /p:XPDeprecationWarning=false /p:Platform=x64

How to use clang compiler in Dymola 2021 - Windows

I installed MS Build Tools 2019 (along with clang) and verified the compiler (Visual Studio 2019) but couldn't figure out how to set the compiler to use clang in Dymola. The documentation only mentions support for clang in the linux version but doesn't seem to mention anything about Windows support.
I was wondering if anyone has figured out how to set the compiler to clang through MS Build.

CMake cannot identify C compiler from installed Visual Studio 2015

I have been trying to install CMake for vtk, but I'm getting this error message:
The C compiler identification is unknown,The CXX compiler identification is unknown.
I'm using CMake 3.2.1, vtk 6.2.0 and Visual Studio 2015.
Screenshot
Please take a look at this answer if it helps:
CMake does not find Visual C++ compiler
Basically VS2015 doesn't install Cx compilers by default. Creating a C++ project in VS2015 will force VS to download necessary compilers.
here is what worked for me:
Relaunch Visual Studio 2015 install
Choose "modify"
Check that both this components are installed: "Common tools for visual c++ 2015" AND "Tools and Windows XX SDK"
If not, check and choose "update"
Once I installed this components, CMake was able to detect the C/C++ compiler.
Open developer command prompt from visual studio tools.
reach to the directory where your cmake exe resides.
Run it.
Hopefully, now it will find the c and cxx compiler and run as desired.

From where to download compiled and ready to use MonoDev for Mono 2 under Windows?

I have heard a lot about Mono and its usability compared to .NET and its cross platform support.
I tried to find a working version of MonoDev which will give me a visual way (like MS visual Studio) of working with Mono 2.x.
Have we to compile it from code or has someone provided a link to download a working and precompiled version of MonoDev that works in Win 2000 and higher?
You don't need MonoDevelop to build applications that run on Mono. The main feature of Mono is that it runs .NET assemblies without need for re-compilation. You can build in Visual Studio (including any of the free versions of Visual Studio Express) and run your applications under Mono without change, providing Mono supports the API's you're using.
You can use the Mono Migration Analyzer (MOMA) to test your assemblies to see if Mono will support them. It inspects the MSIL code directly, so it's very quick to test them.
I believe it is possible to run MonoDevelop on Win32: http://www.monodevelop.com/MonoDevelopWin32
You can run MonoDevelop on Windows using AndLinux.
You can either:
Download one of the completely free Visual Studio Express versions: http://www.microsoft.com/express/product/default.aspx
Use SharpDevelop. There is no need to 'support' Mono, just develop like you normally would, and then copy your binaries over and Mono will run them.
Like others said, the point of Mono is to work the same as MS's .NET. You can develop in VS, then run it on Mono. That being said, if you really want to run MonoDevelop on Windows, don't let anyone tell you it can't be done. If you're curious about it, with a little bit of Cygwin hackery, I've been able to get MonoDevelop to compile cleanly on Windows, and run in an acceptable way. http://monodevelop.com/MonoDevelopWin32 has some instructions on how to get it working, but they are out of date. The current SVN trunk for MonoDevelop has better support for Windows, so try compiling with Cygwin if you're feeling daring.
MonoDevelop does not currently run on Windows. It currently runs on Linux and OSX.
On Windows, you can use Visual Studio or SharpDevelop and copy your binaries over to Linux or OSX to run them.