Fix ninja build. #23

Merged
merged 1 commit into from Jul 8, 2013

Conversation

Projects
None yet
2 participants
Contributor

ihnorton commented Jun 20, 2013

Uses more compatible Windows pathlist separator,
tested with VS2008, VS2012, and Ninja/VS2012

Contributor

ihnorton commented Jun 20, 2013

Here is the problem this is intended to solve - the path seperator semi-colon is being interpreted as a list by cmake, so the PYTHONPATH is truncated.

C:\cmn\git\py-cm-build\build>ninja
[1/4] Building C object CMakeBuild\lib...r\__\__\Python-2.7.3\PC\getpathp.c.obj
FAILED: "C:/Program Files (x86)/CMake 2.8/bin/cmcldeps.exe" C ..\Python-2.7.3\PC
\getpathp.c "CMakeBuild/libpython/CMakeFiles/libpython-static.dir/__/__/Python-2
.7.3/PC/getpathp.c.obj.d" CMakeBuild\libpython\CMakeFiles\libpython-static.dir\_
_\__\Python-2.7.3\PC\getpathp.c.obj  "Note: including file: "  "C:/opt/VS2012/VC
/bin/x86_amd64/cl.exe" C:\opt\VS2012\VC\bin\x86_amd64\cl.exe   /nologo /DWIN32 /
D_WINDOWS /W3 /MD /O2 /Ob1 /D NDEBUG -I..\cmake -I..\Python-2.7.3\Include -I..\P
ython-2.7.3\PC -I..\Python-2.7.3\Python  -D.\\Lib -D.\\Lib\\lib-dynload -D.\\Lib
\\lib-dynload\\. -D.\\Lib\\lib-tk" -D.\\Lib\\plat-win32 -DLANDMARK=\"Lib\\os.py\
" -DNDEBUG -DPYTHONPATH=\" -DPy_BUILD_CORE -DPy_NO_ENABLE_SHARED /FoCMakeBuild\l
ibpython\CMakeFiles\libpython-static.dir\__\__\Python-2.7.3\PC\getpathp.c.obj /F
dstatic-libs\python27.pdb -c ..\Python-2.7.3\PC\getpathp.c
cl : Command line error D8003 : missing source filename
ninja: build stopped: subcommand failed.
Contributor

ihnorton commented Jun 20, 2013

5d8b3ae is more conservative by maintaining the existing behavior for non-Ninja generators. I'm not 100% sure how this will behave with absolute paths - but it seems to be safe with a few basic tests.

Contributor

ihnorton commented Jul 1, 2013

@jcfr any thoughts on this / what is the best way to fix it? Should this be fixed at the cmake ninja generator level?

Contributor

jcfr commented Jul 1, 2013

@ihnorton Just back from travelling/vacation last night, I will looking at this asap.

Contributor

ihnorton commented Jul 1, 2013

No worries, hope vacation was good. Thanks.

Fix ninja build.
Uses more compatible Windows pathlist separator,
tested with VS2008, VS2012, and Ninja/VS2012
Contributor

ihnorton commented Jul 3, 2013

8247fa9 is the correct way to fix this (finally). Tested on 2008, 2012, and 2012+Ninja

jcfr added a commit that referenced this pull request Jul 8, 2013

@jcfr jcfr merged commit 892c95b into python-cmake-buildsystem:master Jul 8, 2013

Contributor

ihnorton commented Jul 8, 2013

Thanks!

pieper pushed a commit to pieper/Slicer that referenced this pull request Apr 26, 2014

COMP: Fix python build error occurring when using VisualStudio with N…
…inja

This has been tested on Visual Studio 2008, 2012, and 2012+Ninja

See python-cmake-buildsystem/python-cmake-buildsystem#23

From: Isaiah Norton <inorton@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22154 3bd1e089-480b-0410-8dfb-8563597acbee

finetjul pushed a commit to finetjul/Slicer that referenced this pull request May 7, 2014

COMP: Fix python build error occurring when using VisualStudio with N…
…inja

This has been tested on Visual Studio 2008, 2012, and 2012+Ninja

See python-cmake-buildsystem/python-cmake-buildsystem#23

From: Isaiah Norton <inorton@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22154 3bd1e089-480b-0410-8dfb-8563597acbee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment