bupticybee / TexasSolver

🚀 A very efficient Texas Holdem GTO solver :spades::hearts::clubs::diamonds:
https://bupticybee.github.io/texassolver_page
GNU Affero General Public License v3.0
1.65k stars 294 forks source link

Missing CMakeLists.txt on building console version #125

Closed silentdiverchris closed 1 year ago

silentdiverchris commented 1 year ago

I am trying to build using the instructions in https://github.com/bupticybee/TexasSolver/tree/console#compile-from-source but am getting the error;

CMake Error: The source directory "C:/TexasSolver/Project" does not appear to contain CMakeLists.txt.

This is with the supplied batch commands and with the CMake GUI - I'm new to all this so have been reading up and from what I can tell, CMakeLists.txt describes what files need building etc. and isn't something I can necessarily create / should get automatically created by CMake etc.

There's no CMakeLists.txt file anywhere in the structure, so I don't think I'm starting from the wrong directory or something like that.

Is the file missing, or can you please suggest what I might be doing wrong ? - the batch file I am using is below, essentially as per instructions with some pauses added. I am running VS2022 so altered the path to the batch file (and that part runs fine);

I also added a 'call' to the batch file execution of vcvars64.bat but as I say, that bit works OK, it's the call the cmake directly after that that fails.

Thanks in advance for any assistance :)

` c:

cd /TexasSolver/Project

mkdir vsbuild

cd vsbuild

SET PATH=%PATH%;C:\Program Files\CMake\bin

pause

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release

pause

nmake install

pause

cd ../install

./console_solver.exe -i resources/text/commandline_sample_input.txt

pause ` Screenshot of the batch fail below; image

silentdiverchris commented 1 year ago

Answering my own question here, the problem was that I got the master branch, not the console branch. I will leave this here in case somebody else does that particular dumb thing, no need to respond, thanks.

bupticybee commented 1 year ago

Answering my own question here, the problem was that I got the master branch, not the console branch. I will leave this here in case somebody else does that particular dumb thing, no need to respond, thanks.

Yes, it's a common issue.

bupticybee commented 1 year ago

Please don't use any microsoft's compiler to build it, it would give slower binary. Use Mingw64.

bupticybee commented 1 year ago

Using VS code's devault compiler would give 50% slower binary, not sure what microsoft do or didn't do here.

silentdiverchris commented 1 year ago

Using VS code's devault compiler would give 50% slower binary, not sure what microsoft do or didn't do here.

Funny you should mention that, that's exactly what i found, the 7-8 second startup is more like 15 with the one I built here !! - one of my tasks for this afternoon was to scratch my head about that (or studiously ignore it and hope it went away) - thanks for saving me one or both !