I currently have it set as part of the cmake vars in the kit. For any project I have that previously used "Unix Makefile" (that's a lot of projects) I have to remove all the build folders and the CMakeLists.txt.user files (which nukes all my other project preferences) and then sometimes that works. Sometimes I have to restart Qt Creator. I have to wrestle it into submission. Then recreate my project preferences.
There is some (over-?) caching done here as Tobias mentioned. I still think this should be simpler! Might that also explain why sometimes I can't turn off an option in a project using the interface? I click the checkbox to turn it off, click the button to apply config, and it turns it back on, ...then applies config. Then I have to delete everything and start from scratch. Very time consuming and anti-productive. Semi-related: Is there a way to use the "official" CMake application to handle my configuration instead? I find it much more intuitive. Or is this too tightly integrated? Thanks everyone for your help! --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney <https://twitter.com/asmaloney> On Tue, Apr 14, 2020 at 2:24 AM Eike Ziller <[email protected]> wrote: > Hi, > > Qt Creator does not set CMAKE_MAKE_PROGRAM explicitly itself, so it must > be pulled in from some configuration. > This could be from an existing CMakeCache.txt in the build directory, > or maybe it somehow slipped into your project’s .user file > (CMakeLists.txt.user in your project source). > In these cases the variable will be set in your project’s build > configuration in Projects mode, so check if it’s there and if so, you need > to fix it there. > > Hope that helps, Eike > > > On Apr 10, 2020, at 19:08, Andy <[email protected]> wrote: > > > > Uh.. no I did not. As I said in my previous email I set it to <path to > brew's>/ninja. > > > > It did not work fine. Nor did setting the PATH in the environment > setting of my kit work. > > > > Is it possible there's some Qt Creator cache somewhere that's borking > it? Maybe something in one of these temp directories? > /private/var/folders/xs/ktjsndz94095_l042qqprtb40000gn/T/QtCreator-mxDtQs/ > > > > I did try deleting that and my build directory to start from scratch and > still nothing worked. > > > > --- > > Andy Maloney // https://asmaloney.com > > twitter ~ @asmaloney > > > > > > > > On Thu, Apr 9, 2020 at 11:52 PM Aleksandr Chupikov <[email protected]> > wrote: > > Hello Andy. > > You set CMAKE_MAKE_PROGRAM to /usr/bin/make instead of ninja executable. > > Try set it to /usr/local/bin/ninja and it will work fine. > > > > > > пт, 10 апр. 2020 г. в 04:00, Andy <[email protected]>: > > I want a solution that applies to all cmake projects, so I tried > suggestion #3 and added: > > > > CMAKE_MAKE_PROGRAM:FILEPATH=<path to brew's>/ninja > > > > to "CMake Configuration" in the kit. > > > > Now I get a blank UI for my build settings with an error at the top > "Invalid codemodel file generated by CMake" and this error in the console: > > > > ---- > > Running <brew path>/cmake/3.17.0_1/bin/cmake <project path> -GNinja > -DCMAKE_BUILD_TYPE:STRING=Debug > -DCMAKE_CXX_COMPILER:STRING=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ > -DCMAKE_C_COMPILER:STRING=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang > -DCMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make > -DCMAKE_PREFIX_PATH:STRING=/Users/maloney/dev/Trolltech/Qt-5.x > -DGIT_SUBMODULE_UPDATE:BOOL=ON > -DQT_QMAKE_EXECUTABLE:STRING=/Users/maloney/dev/Trolltech/Qt-5.x/bin/qmake > -DUSE_ASAN:BOOL=ON in > /private/var/folders/xs/ktjsndz94095_l042qqprtb40000gn/T/QtCreator-mxDtQs/qtc-cmake-ZFkreNHc. > > -- The CXX compiler identification is AppleClang 11.0.0.11000033 > > -- Check for working CXX compiler: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ > > CMake Error: > > The detected version of Ninja (GNU Make 3.81 > > > > Copyright (C) 2006 Free Software Foundation, Inc. > > > > This is free software; see the source for copying conditions. > > > > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > > > > PARTICULAR PURPOSE. > > > > This program built for i386-apple-darwin11.3.0) is less than the > version of > > Ninja required by CMake (1.3). > > > > CMake Error at > /Users/maloney/dev/Cellar/cmake/3.17.0_1/share/cmake/Modules/CMakeTestCXXCompiler.cmake:37 > (try_compile): > > Failed to generate test project build system. > > ---- > > > > So then I fell back to suggestion #2 and added the brew install path to > the environment setting of my kit. This resulted in the same error. > > > > > > $ ninja --version > > 1.10.0 > > > > This is the most recent ninja release. > > > > This seems way harder than it should be. Maybe a way to set the path to > ninja explicitly in the interface could be added? > > > > --- > > Andy Maloney // https://asmaloney.com > > twitter ~ @asmaloney > > > > > > > > On Wed, Apr 8, 2020 at 3:15 AM Eike Ziller <[email protected]> wrote: > > > > > > > On Apr 7, 2020, at 21:39, Andy <[email protected]> wrote: > > > > > > (Using Qt Creator 4.11.2) > > > > > > I've recently switched to building with ninja. I have it installed > using homebrew and it is in my PATH. > > > > > > When I try to set up a cmake-based project with Creator, I get this: > > > > > > CMake Error: CMake was unable to find a build program corresponding to > "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a > different build tool. > > > > > > I found this bug report, but it is closed and doesn't seem to provide > a solution: > > > > > > https://bugreports.qt.io/browse/QTCREATORBUG-17566 > > > > > > I have tried setting CMAKE_MAKE_PROGRAM in my kit's "Environment", but > that didn't do anything. > > > > > > Where am I supposed to set this so Creator can find ninja? > > > > The issue here is that macOS uses different environments for > applications started from Finder / Spotlight / Dock, than what you get in > Terminal. > > There are multiple possible solutions to your issue: > > > > - Run Qt Creator from the Terminal environment. E.g. open Terminal, run > “open ~/path/to/Qt\ Creator.app”. > > - Set the PATH in your kit. In the environment setting of the Kit, add > “PATH=/usr/local/bin:${PATH}” > > - Set CMAKE_MAKE_PROGRAM in the kit’s cmake configuration. That’s at the > bottom of the kit settings, “CMake Configuration”, where also > CMAKE_CXX_COMPILER and other things are set. > > > > You could also change the PATH or CMAKE_MAKE_PROGRAM in the > corresponding settings in your project’s build configuration. > > > > Br, Eike > > > > -- > > Eike Ziller > > Principal Software Engineer > > > > The Qt Company GmbH > > Erich-Thilo-Straße 10 > > D-12489 Berlin > > [email protected] > > http://qt.io > > Geschäftsführer: Mika Pälsi, > > Juha Varelius, Mika Harjuaho > > Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht > Charlottenburg, HRB 144331 B > > > > _______________________________________________ > > Qt-creator mailing list > > [email protected] > > https://lists.qt-project.org/listinfo/qt-creator > > > > > > -- > > Александр Чупиков. > > -- > Eike Ziller > Principal Software Engineer > > The Qt Company GmbH > Erich-Thilo-Straße 10 > D-12489 Berlin > [email protected] > http://qt.io > Geschäftsführer: Mika Pälsi, > Juha Varelius, Mika Harjuaho > Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht > Charlottenburg, HRB 144331 B > >
_______________________________________________ Qt-creator mailing list [email protected] https://lists.qt-project.org/listinfo/qt-creator
