Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Destranix
1 year ago

So I use Eclipse with the corresponding plugin so far.

Or Notepad++ as a text editor.

Others probably use frequent visual studio code. Visual Studio will probably also be used by some.

To build CMake projects, I use the following build script. This allows to build uncomplicated even without the Visual Studio IDE.

This can be packed into a subfolder of the project and executed there. In the last line of the script you can specify the build configuration:

 @echo off setlocal cd /d %~dp0 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set arch_command_length=32 || set arch_command_length=64 echo "%PROCESSOR_ARCHITECTURE%" | find /i "arm" > NUL && goto ARM || goto AMD :ARM IF %arch_command_length% == 32 (   set arch_string=x86_arm   set arch_command_length_string=x86 ) ELSE (   set arch_string=amd64_arm64   set arch_command_length_string=x64 ) goto VC_VARC_INIT :AMD IF %arch_command_length% == 32 (   set arch_string=x86   set arch_command_length_string=x86 ) ELSE (   set arch_string=amd64   set arch_command_length_string=x64 ) goto VC_VARC_INIT :VC_VARC_INIT call vcvarsall.bat %arch_string% -vcvars_ver= set compiler_path=%VCToolsInstallDir%\bin\Host%arch_command_length_string%\%arch_command_length_string%\cl.exe set linker_path=%VCToolsInstallDir%\bin\Host%arch_command_length_string%\%arch_command_length_string%\link.exe set archiver_path=%VCToolsInstallDir%\bin\Host%arch_command_length_string%\%arch_command_length_string%\lib.exe call "%DevEnvDir%\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja Multi-Config" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_AR:FILEPATH="%archiver_path%" -DCMAKE_LINKER:FILEPATH="%linker_path%" -DCMAKE_INSTALL_PREFIX:PATH="%CD%\out\install" -DCMAKE_CXX_COMPILER:FILEPATH="%compiler_path%" -DCMAKE_C_COMPILER:FILEPATH="%compiler_path%" -DCMAKE_MAKE_PROGRAM="%DevEnvDir%\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "%CD%\.." call "%DevEnvDir%\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" --build . --target install --config Debug