View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011910 | CMake | Modules | public | 2011-03-01 03:58 | 2012-07-09 06:52 | ||||
Reporter | Raymond Wan | ||||||||
Assigned To | Rolf Eike Beer | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | AMD64 | OS | Debian | OS Version | 6.0 | ||||
Product Version | CMake-2-8 | ||||||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||||||
Summary | 0011910: FindOpenMP.cmake requires both C and CXX | ||||||||
Description | If only CXX is enabled and not C, then many errors are produced that look like this (path shortened): -- Performing Test OpenMP_FLAG_DETECTED CMake Error: Unknown extension ".c" for file ".../build/CMakeFiles/CMakeTmp/src.c". TRY_COMPILE only works for enabled languages. Currently enabled languages are: CXX See PROJECT command for help enabling other languages. Looking at the module, it seems that (1) it performs both the C and CXX tests unconditionally. So if C is not enabled, then the C tests will generate the above error. (2) Also, at the end of the module, the use of find_package_handle_standard_args() seems to require that both C and CXX flags have to be set. Also, (3) there is a minor problem with the check_c_source_compiles () using the CXX source, and vice-versa. (As the two sources are identical, the effect is trivial.) ----- Notes: 1) Debian 6.0 is using cmake 2.8.2 . However, looking at 2.8.4, it seems that the problem still persists. 2) A similar problem for an entirely different module appears to be described here: http://www.mail-archive.com/cmake@cmake.org/msg06043.html [^]] | ||||||||
Steps To Reproduce | Have a PROJECT () line with just CXX and no C enabled. | ||||||||
Additional Information | Attached is a diff file with changes that hopefully addresses the 3 problems above by performing the test only if either the C or CXX compiler is defined. The diff file is generated against the newer 2.8.4 and not the 2.8.2 that I'm using. As I'm not experienced with cmake, hopefully it is correct and of some help. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | FindOpenMP.2-8-4.patch [^] (3,209 bytes) 2011-03-01 03:58 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0028515) Justin (reporter) 2012-02-06 07:42 |
Patch works fine, please apply. |
(0028525) Rolf Eike Beer (developer) 2012-02-08 13:04 |
Pushed fix to next: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81228e9d1d94cb55fa0a75b474c5a3283b39551a [^] It's not your one, but does the same. |
(0029964) David Cole (manager) 2012-07-09 06:52 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-03-01 03:58 | Raymond Wan | New Issue | |
2011-03-01 03:58 | Raymond Wan | File Added: FindOpenMP.2-8-4.patch | |
2012-02-06 07:42 | Justin | Note Added: 0028515 | |
2012-02-08 13:04 | Rolf Eike Beer | Note Added: 0028525 | |
2012-02-08 13:04 | Rolf Eike Beer | Assigned To | => Rolf Eike Beer |
2012-02-08 13:04 | Rolf Eike Beer | Status | new => resolved |
2012-02-08 13:04 | Rolf Eike Beer | Resolution | open => fixed |
2012-02-08 13:04 | Rolf Eike Beer | Fixed in Version | => CMake 2.8.8 |
2012-02-08 13:04 | Rolf Eike Beer | Target Version | => CMake 2.8.8 |
2012-07-09 06:52 | David Cole | Note Added: 0029964 | |
2012-07-09 06:52 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |