Summary: | Error on emerge kdevelop in kcwsh | ||
---|---|---|---|
Product: | kde-windows | Reporter: | Michael Gooch <goochmi> |
Component: | other | Assignee: | KDE-Windows <kde-windows> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | kfunk, mail, ps_ml |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
CMakeLists from tset directory, with the change I made
fixes the compiler flag for the affected target |
Description
Michael Gooch
2014-11-10 19:37:39 UTC
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 |