How to Use CMake for Non-Interactive Build on Windows?

前端 未结 4 1241
离开以前
离开以前 2021-02-06 02:03

I want to set up automated build using CMake on Windows. I am using Visual Studio 2005.

Update: Here is what I am using:

I set devenv.exe to my

4条回答
  •  萌比男神i
    2021-02-06 02:30

    This is the bat file I created. It automatically creates the solution in the build folder you specify, each time deleting and creating a new build folder.

    RMDIR C:\Users\abc /s /q
    
    if EXIST C:\Users\abc GOTO FALIURE
    
    MKDIR C:\Users\abc\build
    CD C:\Users\abc\build
    cmake -G "Visual Studio 12" "C:\Users\abc\src"
    EXIT
    
    :FALIURE
    CLS
    echo "Failed to delete BUILD directory, Close all related files and programs and try again."
    pause
    EXIT
    

提交回复
热议问题