linking against qt5 breaks c++14

Bug #1725664 reported by Nils Schmidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I use cmake to build a project which uses qt5. In zesty and artful compiling fails with:

error: ‘remove_reference_t’ is not a member of ‘std’

I created a minimal example and found out that linking against qt5 like this: target_link_libraries(testlib Qt5::Core) leads to the compiler not finding c++14 types. If I remove Qt5::Core from the line the minimal example compiles.

I use a line like this to compile:
cd ~/cmake_bug/build && rm -rf * && cmake -D CMAKE_BUILD_TYPE=Release ../src && make

The problem does NOT affect 16.04. With 16.10 I don't know.

Revision history for this message
Nils Schmidt (nils-p-schmidt) wrote :
Revision history for this message
Nils Schmidt (nils-p-schmidt) wrote :

Seems to be related to https://gitlab.kitware.com/cmake/cmake/issues/16608 so there is a workaround: SET(CMAKE_CXX_STANDARD 14)

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

So, I don't think this is a bug, moreover how can you have cmake 3.9 on 16.04?

I tested on 17.04 and works with that SET(CMAKE_CXX_STANDARD 14)

Changed in cmake (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cmake (Ubuntu) because there has been no activity for 60 days.]

Changed in cmake (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.