- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    None
- 
    Qt Creator 4.3.0
- 
    Linux, cmake version 3.8.1, clang-4.0
When just creating a CMake based project, the Build command is inaccessible. Messages output looks like this:
Running "/usr/bin/cmake /home/max/proj/cmaketest '-GCodeBlocks - Ninja' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/clang++ -DCMAKE_C_COMPILER:STRING=/usr/bin/clang" in /tmp/QtCreator-8vsTtb/qtc-cmake-XXuvkiUU. Running "/usr/bin/cmake /home/max/proj/cmaketest '-GCodeBlocks - Ninja' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/clang++ -DCMAKE_C_COMPILER:STRING=/usr/bin/clang" in /tmp/QtCreator-8vsTtb/qtc-cmake-XXY0KLpE. -- The C compiler identification is Clang 4.0.0 -- The CXX compiler identification is Clang 4.0.0 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /tmp/QtCreator-8vsTtb/qtc-cmake-XXY0KLpE
Only when I manually click "Run CMake" once again, the button is unblocked. More messages added:
Running "/usr/bin/cmake /home/max/proj/cmaketest '-GCodeBlocks - Ninja'" in /tmp/QtCreator-8vsTtb/qtc-cmake-XXY0KLpE. -- Configuring done -- Generating done -- Build files have been written to: /tmp/QtCreator-8vsTtb/qtc-cmake-XXY0KLpE
When I press Build, it runs CMake yet once again. This is a problem on its own, since some complex CMake projects dealing with dynamically generated dependencies may take significant time to configure (up to minutes).
What's worse is, Creator shows build error:
10:24:55: Running steps for project cmaketest... 10:24:55: Persisting CMake state... Error while building/deploying project cmaketest (kit: Clang) When executing step "CMake Build" 10:24:55: Elapsed time: 00:00.
Though, the build has actually been triggered and runs in the background. The Build button is then once again disabled. If I "Run Cmake" yet again, it starts rebuilding normally.
- is duplicated by
- 
                    QTCREATORBUG-18240 Buttons for build/debug/run remain disabled after running cmake -         
- Closed
 
-         
- relates to
- 
                    QTCREATORBUG-18469 Build menu action not updated correctly -         
- Closed
 
-