Review Request 111130: [outputview/tests] Fix build when PROJECTS_SOURCE_DIR contains spaces

Andrea Scarpino scarpino at kde.org
Wed Jun 19 17:44:47 UTC 2013



> On June 19, 2013, 6:53 p.m., Aleix Pol Gonzalez wrote:
> > Don't you get the same error in other parts of KDevelop? we're using this trick in many places...
> 
> Andrea Scarpino wrote:
>     yep...
>     
>     project/tests/CMakeLists.txt:#add_definitions( -DBUILD_DIR="\\"${KDevPlatform_BINARY_DIR}\\"" )
>     shell/tests/CMakeLists.txt:#add_definitions( -DBUILD_DIR="\\"${KDevPlatform_BINARY_DIR}\\"" )
>     
>     KDevelop:
>     debuggers/gdb/printers/tests/CMakeLists.txt:add_definitions("-DPRINTER_BIN_DIR=\\\"${CMAKE_CURRENT_BINARY_DIR}\\\"")
>     documentation/qthelp/tests/CMakeLists.txt:add_definitions( "-DQTHELP_FILES=\\\"${CMAKE_CURRENT_SOURCE_DIR}/documentation\\\"" )
>     projectmanagers/custom-buildsystem/tests/CMakeLists.txt:add_definitions( "-DPROJECTS_SOURCE_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/projects\\\"" )
> 
> Aleix Pol Gonzalez wrote:
>     Why is it that you didn't hit it on those?
>     
>     Can you propose a patch that fixes all of them? :D

So, after a bit of testing, the issue here is how the escaping has been done.
Instead of applying this patch, I could apply this one:

-add_definitions( "-DPROJECTS_SOURCE_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/projects\\\"" )
+add_definitions( -DPROJECTS_SOURCE_DIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/projects\\"" )

About KDevelop, I still didn't build it, that's because I didn't get the error :-)

I can fix all escaping, so we can stay with add_definitions.


- Andrea


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111130/#review34685
-----------------------------------------------------------


On June 19, 2013, 6:38 p.m., Andrea Scarpino wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111130/
> -----------------------------------------------------------
> 
> (Updated June 19, 2013, 6:38 p.m.)
> 
> 
> Review request for KDevelop and Morten Volden.
> 
> 
> Description
> -------
> 
> - Fix build when PROJECTS_SOURCE_DIR contains spaces
> - Define PROJECTS_SOURCE_DIR as constant, not as a compiler flag.
> 
> 
> Diffs
> -----
> 
>   outputview/tests/CMakeLists.txt 2be5f82 
>   outputview/tests/outputview-tests.h.cmake PRE-CREATION 
>   outputview/tests/testlinebuilderfunctions.h 653e484 
> 
> Diff: http://git.reviewboard.kde.org/r/111130/diff/
> 
> 
> Testing
> -------
> 
> Builds.
> 
> 
> Thanks,
> 
> Andrea Scarpino
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130619/0f03ce7a/attachment.html>


More information about the KDevelop-devel mailing list