View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014056 | CMake | Modules | public | 2013-04-02 10:47 | 2014-10-06 10:32 | ||||
Reporter | Daniele E. Domenichelli | ||||||||
Assigned To | Daniele E. Domenichelli | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | ||||||
Summary | 0014056: CheckTypeSize does not work if C language is not enabled | ||||||||
Description | If C language is not enabled, it is impossible to use the CheckTypeSize module. | ||||||||
Steps To Reproduce | This is a minimal CMakeLists.txt to show the issue: --- cmake_minimum_required(VERSION 2.6.4) project(test_prj CXX) include(CheckTypeSize) check_type_size("short" SIZEOF_SHORT) | ||||||||
Additional Information | Output: --- -- Check size of short CMake Error at /usr/share/cmake-2.8/Modules/CheckTypeSize.cmake:89 (try_compile): Unknown extension ".c" for file /opt/iit/build/testxx/CMakeFiles/CheckTypeSize/SIZEOF_SHORT.c try_compile() works only for enabled languages. Currently these are: CXX See project() command to enable other languages. Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/CheckTypeSize.cmake:174 (__check_type_size_impl) CMakeLists.txt:6 (check_type_size) -- Configuring incomplete, errors occurred! | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0035413) Andreas Schuh (reporter) 2014-03-15 10:03 |
I noticed that the current CMake Git master branch (SHA 34a49dea) contains a modified CheckTypeSize.cmake module which accepts a language argument. However, this module still causes an error when used for CXX only because it tries to check the available system headers using check_include_file instead of check_include_file_cxx. |
(0035423) Daniele E. Domenichelli (developer) 2014-03-17 12:39 |
Pushed to next: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d6d45f2 [^] Unit test: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f857775 [^] |
(0035431) Andreas Schuh (reporter) 2014-03-18 12:00 |
I encountered another problem with the latest CheckTypeSize.cmake module (SHA 34a49dea). It states the minimum required CMake version is 2.6. However, it passes the LINK_LIBRARIES on to try_compile. This option is supported by this command only since version 2.8.11 of CMake. Either the module needs to require this later version of CMake explicitly or ignore the LINK_LIBRARIES (possibly with a warning). |
(0035451) Brad King (manager) 2014-03-20 09:11 |
Re 0014056:0035431: Since the module comes with CMake we know it is running in a new enough version. That cmake_minimum_required call is there to set policies to match what the module expects. I suspect it can be updated or removed but that is a separate issue. |
(0036946) Robert Maynard (manager) 2014-10-06 10:32 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-04-02 10:47 | Daniele E. Domenichelli | New Issue | |
2014-03-15 10:03 | Andreas Schuh | Note Added: 0035413 | |
2014-03-17 09:16 | Brad King | Assigned To | => Daniele E. Domenichelli |
2014-03-17 09:16 | Brad King | Status | new => assigned |
2014-03-17 12:39 | Daniele E. Domenichelli | Note Added: 0035423 | |
2014-03-18 12:00 | Andreas Schuh | Note Added: 0035431 | |
2014-03-20 09:11 | Brad King | Note Added: 0035451 | |
2014-03-20 09:11 | Brad King | Status | assigned => resolved |
2014-03-20 09:11 | Brad King | Resolution | open => fixed |
2014-03-20 09:11 | Brad King | Fixed in Version | => CMake 3.1 |
2014-03-20 09:11 | Brad King | Target Version | => CMake 3.1 |
2014-10-06 10:32 | Robert Maynard | Note Added: 0036946 | |
2014-10-06 10:32 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |