Notes |
|
(0024619)
|
Brad King
|
2011-01-12 10:44
|
|
|
|
(0024620)
|
Michal Cihar
|
2011-01-12 11:04
|
|
No it does not fix it. I've rebuilt 2.8.3 with this patch and it still fails in same way. |
|
|
(0024621)
|
Michal Cihar
|
2011-01-12 11:10
|
|
The problem is in make generator - the dependencies can not contain literal =, but it needs to be escaped.
CMake generates:
CMakeFiles/cmTryCompileExec.dir/HAVE_INTPTR_T.c.o: /tmp/cmake-bug=/CMakeFiles/CheckTypeSize/HAVE_INTPTR_T.c
While it should be:
CMakeFiles/cmTryCompileExec.dir/HAVE_INTPTR_T.c.o: /tmp/cmake-bug\=/CMakeFiles/CheckTypeSize/HAVE_INTPTR_T.c |
|
|
(0024625)
|
Brad King
|
2011-01-12 12:18
|
|
GNU Make does not seem to like = in rules, especially on the left:
$ cat Makefile
all: a=b
a=b:
@echo a=b
$ make
make: *** No targets. Stop.
$ cat Makefile
all: a\=b
a=b:
@echo a=b
$ make
make: *** No rule to make target `a=b', needed by `all'. Stop.
$ cat Makefile
all: a\=b
a\=b:
@echo a=b
$ make
make: *** No rule to make target `a=b', needed by `all'. Stop. |
|
|
(0024626)
|
Brad King
|
2011-01-12 12:19
|
|
Out of curiosity, why do you need = in your path?
I think the right solution here might be to make CMake error-out up front if = is in the path to the source or build tree. |
|
|
(0024627)
|
Michal Cihar
|
2011-01-12 12:24
|
|
I don't need it. I was just debugging why Gammu fails to compile in such path: https://bugs.cihar.com/view.php?id=1128#c4447 [^]
Telling user he is doing something wrong is also a solution and definitely better than some silently failing checks.
However all other things seems to be working (I can build the project after forcing results of these checks), so this is single place where the absolute path is put to makefile in way which causes troubles. |
|
|
(0024629)
|
Brad King
|
2011-01-12 13:13
|
|
Unfortunately your "single place" is just one instance of a more general problem. I built CMake itself under such a path and ran the test suite. Everything passed except for 2 tests:
42 - LinkDirectory (Failed)
75 - OutOfSource (Failed)
Most things work because CMake writes Makefiles with mostly relative paths under the top of the build tree on the left-hand side of make rules. Therefore the '=' does not appear in most of the rules. However, there are cases when CMake cannot do this and ends up requiring the full path on the left-hand side. The above tests cover some of these cases.
I think an early error is the safest approach. |
|
|
(0024638)
|
Michal Cihar
|
2011-01-12 18:11
|
|
Indeed failing early is still much better than failing silently somewhere during the build process. |
|
|
(0024677)
|
Brad King
|
2011-01-14 10:14
|
|
|
|
(0029619)
|
Brad King
|
2012-06-06 08:54
|
|
|