Cmake command line to set the compiling environment

Source: Internet
Author: User

I installed two versions of vs (vs2012 and vs2010) on my computer. When using cmake for compilation, if you only enter "cmake .. "Then the system automatically chooses to use the new version (vs2012) for compilation. If you must use vs2010 for compilation in some occasions, you can use the cmake GUI on the Windows platform to set it, A simpler method is to set parameters in the command line.

The setting method is as follows:

The general process of cmake is: Open the command line window in the directory containing the cmakelists.txt file, create a sub-folder for mkdir bin, and enter the bin folder for CD bin,

Cmake-G "Visual Studio 10 2010" .. use cmake for compilation

You can use cmake-h to view the configurable compiling environment.

Cmake command line to set the compiling environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.