Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Travis CI and Qt5

Tags:

c++

travis-ci

qt

I am trying to configure my project on GitHub using continuous integration and would like to use Travis CI to do so. However, I am getting a build error with the current configuration of my travis.yml. My project uses Qt5, SQLite, and is in C++.

This is the yml:

language: cpp

compiler: gcc

before_install:
 - sudo apt-get update -qq
 - sudo apt-get install -qq sqlite3 qt5-dev-tools

before_script:
  - mkdir build
  - cd build
  - cmake

script: make

I am new to this and I tried reading up on the documentation on their site, but I'm still having an issue understanding it. If anyone has an example, I would greatly appreciate it. OS is Windows.

Error:

make: *** No targets specified and no makefile found. Stop.
The command "make && make test" exited with 2.

like image 459
datowlcs Avatar asked Jan 25 '26 10:01

datowlcs


1 Answers

I'd say that CMake has a non-intuitive error reporting here:

before_script:
  - mkdir build
  - cd build
  - cmake

It returns success, although it hasn't configured anything in the build/ directory because it didn't know where the sources are.

Try cmake .. instead. Or cmake <your source directory>

like image 198
Velkan Avatar answered Jan 28 '26 00:01

Velkan