unwanted added compiler arguments
ashaduri at gmail.com
Mon Oct 30 12:51:34 GMT 2017
It probably comes from one of the libraries you use, like Qt.
(I remember Qt >= 5.7 enabling C++11 by default, maybe it defaults
to the latest stable C++ your compiler supports?)
On Mon, 2017-10-30 at 23:28 +1100, Arthur Gruzauskas wrote:
> On Monday, 30 October 2017 11:05:45 PM AEDT you wrote:
> > On Monday, 30 October 2017 12:16:20 PM AEDT Sven Brauch wrote:
> > > On 29/10/17 04:26, Arthur Gruzauskas wrote:
> > > > Started playing with using C++17 features, but have hit a wall
> with some
> > > > unwanted compiler arguments being magically appended.
> > >
> > > What build system do you use? Did you also tell your build system
> > > also use C++17? KDevelop retrieves arguments from there.
> > >
> > > Greetings,
> > > Sven
> My build system is CMake, in the Open Configuration... dialog I
> simply accept the default values for all CMake variables, only
> setting CMAKE_BUILD_TYPE to Release
> In CMakeLists.txt I set:
> set(CMAKE_CXX_COMPILER "/usr/bin/clang++-4.0")
> # see https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/
> set(CMAKE_CXX_STANDARD 14)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> set(CMAKE_CXX_EXTENSIONS OFF)
> set(CMAKE_CXX_FLAGS "-march=native -std=c++1z -pipe -Wall -Werror
> -Wshadow -Wno-c++98-compat -Weverything -Wno-conversion -Wno-sign-
> compare -Wno-c++98-compat-pedantic -Wno-padded -Wno-documentation-
> unknown-command -Wno-deprecated -Wno-covered-switch-default -Wno-
> exit-time-destructors -Wno-global-constructors -Wno-disabled-macro-
> in ~/.bashrc, /etc/bash.bashrc and CMakeLists.txt , a file text
> search shows no reference to 'PIC' nor 'c++14' . Ditto in the Open
> Configuration.. -> Configure Language Support dialog.
> clang & gcc are standard debian testing installs with no
> I have repeatedly removed the whole build directory, used gcc
> instead, to no avail.
> In the compiler build panel, the "-fPIC -std=c++14" looks to be
> appended to my CMAKE_CXX_FLAGS above, as shown in the original post.
> Is this a KDevelop thing, or should I be looking elsewhere?
> Arthur, a bit embarrassed to be bringing up something no one else is
> having a problem with.
More information about the KDevelop