0

Our build contains a lot of tests run as part of the build process to ensure nothing important is broken by someone's changes. These are simple commandline applications, no GUI.

On Mac OS X, when building from within Qt Creator, each of these programs launches a new Terminal window, that takes focus. This interrupts anything I am typing while this build is running, which is quite enervating.

Is there an option in CMake (or Mac OS, or Qt Creator) that forces these custom commands to not take focus?

rubenvb
  • 74,642
  • 33
  • 187
  • 332
  • 1
    I've ever experienced this. CMake runs from the terminal, so you must be using a different setup. Have you tried running cmake directly from Terminal instead? You're going to need to provide more information about what you're doing. – Cinder Biscuits Jan 16 '17 at 16:48
  • @Cinder I'm building from Qt Creator, which invokes `cmake --build`, which invokes plain old `add_custom_command(...POST_BUILD...)`. – rubenvb Jan 16 '17 at 17:00
  • Does it spawn terminals if you run the build from Terminal instead of QtCreator? – Cinder Biscuits Jan 17 '17 at 13:53

1 Answers1

0

You can avoid to open a terminal for every test to be run. This is a project-related setting within QtCreator.

  1. Open your project within QtCreator.
  2. Select "Projects" on the left side
  3. Select "Run"
  4. There is the option "Run in Terminal"

Screenshot QtCreator

Th. Thielemann
  • 2,592
  • 1
  • 23
  • 38
  • The problem is that Qt Creator's Run functionality isn't involved. It's the build tool (cmake/make) that's running the tests, during a build. – rubenvb Jan 16 '17 at 17:47