[cmake-developers] [CMake 0014056]: CheckTypeSize does not work if C language is not enabled

Mantis Bug Tracker mantis at public.kitware.com
Tue Apr 2 10:47:25 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14056 
====================================================================== 
Reported By:                Daniele E. Domenichelli
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14056
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-04-02 10:47 EDT
Last Modified:              2013-04-02 10:47 EDT
====================================================================== 
Summary:                    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!

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-04-02 10:47 Daniele E. DomenichelliNew Issue                               
    
======================================================================




More information about the cmake-developers mailing list