View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011689 | CMake | CMake | public | 2011-01-12 09:21 | 2012-06-06 08:54 | ||||
Reporter | Michal Cihar | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | CMake 2.8.5 | Fixed in Version | CMake 2.8.5 | ||||||
Summary | 0011689: check_type_size fails if source dir contains = | ||||||||
Description | If the project directory name contains =, all check_type_size calls fail. There seems to be problem in calling make... | ||||||||
Steps To Reproduce | Create following CMakeLists.txt and try it in directory containing = cmake_minimum_required (VERSION 2.4.2) project(Test C) include (CheckTypeSize) check_type_size(intptr_t HAVE_INTPTR_T) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeError.log [^] (1,454 bytes) 2011-01-12 09:21 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0024619) Brad King (manager) 2011-01-12 10:44 |
I think this commit may have fixed it already, but have not tested: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe8624b [^] The upcoming 2.8.4 release contains the change. |
(0024620) Michal Cihar (reporter) 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 (reporter) 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 (manager) 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 (manager) 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 (reporter) 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 (manager) 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 (reporter) 2011-01-12 18:11 |
Indeed failing early is still much better than failing silently somewhere during the build process. |
(0024677) Brad King (manager) 2011-01-14 10:14 |
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8704525f [^] |
(0029619) Brad King (manager) 2012-06-06 08:54 |
Just to follow up here after more work in issue 0012934, my conclusion in 0011689:0024625 was incorrect. It is possible to support '=' in Makefile dependencies: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee6c1b8a [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-01-12 09:21 | Michal Cihar | New Issue | |
2011-01-12 09:21 | Michal Cihar | File Added: CMakeError.log | |
2011-01-12 10:44 | Brad King | Assigned To | => Ben Boeckel |
2011-01-12 10:44 | Brad King | Status | new => assigned |
2011-01-12 10:44 | Brad King | Note Added: 0024619 | |
2011-01-12 11:04 | Michal Cihar | Note Added: 0024620 | |
2011-01-12 11:10 | Michal Cihar | Note Added: 0024621 | |
2011-01-12 12:18 | Brad King | Note Added: 0024625 | |
2011-01-12 12:19 | Brad King | Note Added: 0024626 | |
2011-01-12 12:24 | Michal Cihar | Note Added: 0024627 | |
2011-01-12 13:13 | Brad King | Note Added: 0024629 | |
2011-01-12 18:11 | Michal Cihar | Note Added: 0024638 | |
2011-01-14 10:13 | Brad King | Assigned To | Ben Boeckel => Brad King |
2011-01-14 10:14 | Brad King | Note Added: 0024677 | |
2011-01-14 10:14 | Brad King | Status | assigned => closed |
2011-01-14 10:14 | Brad King | Resolution | open => fixed |
2011-06-17 18:21 | David Cole | Fixed in Version | => CMake 2.8.5 |
2011-06-17 18:21 | David Cole | Target Version | => CMake 2.8.5 |
2012-02-06 08:47 | Brad King | Relationship added | has duplicate 0012934 |
2012-02-06 08:47 | Brad King | Relationship replaced | related to 0012934 |
2012-06-06 08:54 | Brad King | Note Added: 0029619 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |