I'm currently building with the Visual Studio compiler using the Ninja generator. The conanbuild.bat/ conanvcvars.bat appears to capture this information for command line usage, but the generated CMakePreset files are lacking it, which means opening through the IDE is liable to give us a different environment than what Conan's CMake build helpers would have chosen. Should the Conan CMake presets generator support setting up a cross compile development environment? This would allow the generated preset to be recognized by more IDEs. The supported schema versions breakdowns as follows: Schema Versionīut, it's not like the generated CMakePresets files are terribly complicated.įor VS2019, we could certainly generate a CMakeUserPresets.json file in the source folder that looks like the CMakePresets.json generated in the build folder, but instead of using toolchain, defines CMAKE_TOOLCHAIN_FILE as a cacheVariable. The Conan 2.0 doc rightly calls out needing CMake 3.23 or greater when using CMakePresets:ĬMake >= 3.23 is required because the “include” from CMakeUserPresets.json to CMakePresets.json is only supported since that version. The choice of targeting schema version 4 means VS2019 / VS2022 are necessarily excluded from consuming some or all of these generated files. VS2019 ships with a build based on CMake 3.20 / version 2, and VS2022 ships one based on CMake 3.22 / version 3. The output is available at gist:c9bbed00423ec4360c199add61a91ae6 (github.Should the Conan CMakePresets generator target a user configurable schema version? And/or target a minimum schema version of 2? Then, I change the generator to Visual StuWin64. vcxproj file CMake generates.ĮTA: When the generator is set to Ninja, everything works without error and I am able to see the following in the Visual Studio IDE’s output box for CMake:ġ> – The C compiler identification is MSVC 7.0ġ> – The CXX compiler identification is MSVC 7.0īelow is the CMake output when I open a cmake project with default VSIDE setting of Ninja generator: CMake generation started for configuration: '圆4-Debug'.ġ> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\ 65001 >NUL & "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" Folder\VSIDE,VSCodePractice\cmake\trials\cmake\windows\install\圆4-Debug" -DCMAKE_INSTALL_PREFIX:PATH="cmake/windows/install/圆4-Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" Folder\VSIDE,VSCodePractice\cmake\trials" 2>&1"ġ> Working directory: Folder\VSIDE,VSCodePractice\cmake\trials\cmake\windows\build\圆4-Debugġ> - The C compiler identification is MSVC 1.0ġ> - The CXX compiler identification is MSVC 1.0ġ> - Detecting C compiler ABI infoġ> - Detecting C compiler ABI info - doneġ> - Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/3/bin/Host圆4/圆4/cl.exe - skippedġ> - Detecting C compile featuresġ> - Detecting C compile features - doneġ> - Detecting CXX compiler ABI infoġ> - Detecting CXX compiler ABI info - doneġ> - Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/3/bin/Host圆4/圆4/cl.exe - skippedġ> - Detecting CXX compile featuresġ> - Detecting CXX compile features - doneġ> - Build files have been written to: Folder/VSIDE,VSCodePractice/cmake/trials/cmake/windows/build/圆4-Debug vcxproj created natively by Visual Studio IDE and compare that with the. Could you please let me know how I could share that with the forum?Ĭould you please help fix this error? I would like to compare the. I am unable to upload the CMakeError.log file as I am a new user. (Same error appears for C compiler as well since I have specified languages as C and CXX) The error is: No CMAKE_CXX_COMPILER could be found. However, when the generator is set to Visual StuWin 64 via changes to CMakeSettings.json, I obtain the following error from the following line on my CML.txt I am able to build this under CMake as well when the generator is set to Ninja. I have a project that I have natively compiled/built under VS 2019 (CL.exe, MSBuild.exe via.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |