[ 79%] [ 82%] Building CXX object tests/CMakeFiles/terminaltest.dir/terminaltest.cpp.obj Building CXX object tests/CMakeFiles/terminaltest.dir/terminaltest_automoc.cpp.obj q:\kcwsh\tests\terminaltest.cpp: In constructor 'TestTerminal::TestTerminal()': q:\kcwsh\tests\terminaltest.cpp:61:52: error: 'nullptr' was not declared in this scope TestTerminal::TestTerminal() : Terminal(), m_timer(nullptr) { ^ q:\kcwsh\tests\terminaltest.cpp: In member function 'void TestTerminal::startCmdDelayed(std::vector<std::basic_string<wchar_t> >, int)': q:\kcwsh\tests\terminaltest.cpp:66:19: error: 'nullptr' was not declared in this scope if(m_timer != nullptr) { ^ q:\kcwsh\tests\terminaltest.cpp: In member function 'virtual void TestTerminal::sizeChanged()': q:\kcwsh\tests\terminaltest.cpp:138:34: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 c = { 80, 25 }; ^ q:\kcwsh\tests\terminaltest.cpp:138:23: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 c = { 80, 25 }; ^ q:\kcwsh\tests\terminaltest.cpp:140:44: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 162, 52 }; ^ q:\kcwsh\tests\terminaltest.cpp:140:32: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 162, 52 }; ^ q:\kcwsh\tests\terminaltest.cpp:145:44: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 160, 50 }; ^ q:\kcwsh\tests\terminaltest.cpp:145:32: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 160, 50 }; ^ q:\kcwsh\tests\terminaltest.cpp:150:49: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 10000, 10000 }; // we want to restrict to the maximum size now ^ q:\kcwsh\tests\terminaltest.cpp:150:32: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 m_testSize = { 10000, 10000 }; // we want to restrict to the maximum size now ^ q:\kcwsh\tests\terminaltest.cpp: In function 'int main()': q:\kcwsh\tests\terminaltest.cpp:220:33: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 t.m_testSize = { 80, 25 }; ^ q:\kcwsh\tests\terminaltest.cpp:220:22: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 t.m_testSize = { 80, 25 }; ^ jom: R:\build\testing\kcwsh\work\mingw-w64-RelWithDebInfo-gitHEAD\tests\CMakeFiles\terminaltest.dir\build.make [tests\CMakeFiles\terminaltest.dir\terminaltest.cpp.obj] Error 1 jom: R:\build\testing\kcwsh\work\mingw-w64-RelWithDebInfo-gitHEAD\CMakeFiles\Makefile2 [tests\CMakeFiles\terminaltest.dir\all] Error 2 jom: R:\build\testing\kcwsh\work\mingw-w64-RelWithDebInfo-gitHEAD\Makefile [all] Error 2 emerge warning: while running make cmd: jom emerge error: fatal error: package testing/kcwsh all failed Reproducible: Always Steps to Reproduce: emerge konsole Actual Results: error as above Expected Results: proper compilation of dependencies and konsole itself
on a quick review it looks like the cmake file simply needs the cpp flag -std=c++11 added
I am not quite sure how to find the required cmake file, as I am not accustomed to the buildsystems that kde-windows porting uses, but I am trying nonetheless in the interest of testing if my assessment is accurate
adding -std=c++11 to the CXXFLAGS variable in r:\build\testing\kcwsh\work\mingw-w64-RelWithDebInfo-gitHEAD\tests\CMakeFiles\terminaltest.dir\flags.make allows this package to compile, but I'm as of yet not sure where I'm supposed to put that flag within the *.cmake files to make it generate the make files containing that flag to begin with.
adding set_target_properties(terminaltest PROPERTIES COMPILE_FLAGS "-std=c++11") between lines 10 and 11 in Q:\kcwsh\tests\CMakeLists.txt seems to fix this
Created attachment 89524 [details] CMakeLists from tset directory, with the change I made
that fix will probably need to be adapted somehow to accomodate people using MS visual compilers
Simply add this to the root CMakeLists.txt: if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() Does that help?
That will probably work Kevin, should just leave this to the devs to implement how they want at this point I guess. It got me past that package build at the very least. (i'm using mingw myself)
Created attachment 89543 [details] fixes the compiler flag for the affected target needs confirmatory testing and a second look to determine i didn't mess it up, but it ought to work properly.
This is Patrick's baby, so I leave the decision for him. But I'd use my solution and just enable C++11 globally. Otherwise you end up doing set_target_properties for every target when you use C++11 features more and more.
I don't think it makes sense to have this lying around as an open bug, I'll close it