BigInt icon indicating copy to clipboard operation
BigInt copied to clipboard

Document sample commands to generate project files using CMake on Windows

Open faheel opened this issue 7 years ago • 4 comments

In the Development section in README, add sample command(s) for properly generating project files using CMake for some popular Windows IDE, such as Visual Studio.

faheel avatar Feb 02 '18 23:02 faheel

@faheel Well for Visual Studio, I recommend that you do something similar to my Appveyor script in my C++ project template. The script I use is:

mkdir build && cd build
cmake -D<options> -G<VS Generator> ..
cmake --build . --config <configuration> # Default build
cmake --build . --target <target> --config <configuration> # Other targets, such as 
    # coverage or test. For testing, ctest is a better option.

In the script above, <options> are any options you pass to CMake (except CMAKE_BUILD_TYPE which doesn't work for multi-config generators anyways).

<VS Generator> is a visual studio generator such as those listed here.

<configuration> needs to be a valid CMake configuration (Debug, Release, DebWithRelInfo, MinSizeRel). If it is excluded, the default configuration is (usually) Debug.

<target> can be any build target. Eg for any target make <target>, you have to pass --target <target> to cmake --build.

I hope this helps and let me know what you think!

arnavb avatar Apr 18 '18 12:04 arnavb

@arnavb Thanks a lot for the detailed info! I'll try running these commands when I log on to Windows next time.

faheel avatar Apr 18 '18 18:04 faheel

Hello @faheel I am new to opensource, I would like to help. Please tell me what I can do.

dnb02 avatar Oct 01 '23 06:10 dnb02

@dnb02 You can try out what arnavb suggested above, and also checkout #38. It would be great if you could include these in the existing GitHub action and see if it passes on Windows.

I'll try running these commands when I log on to Windows next time.

I still haven't logged in to a Windows machine after 5 years 😄

faheel avatar Nov 18 '23 10:11 faheel