View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015438CMake(No Category)public2015-03-09 04:132016-06-10 14:31
ReporterMathieu Malaterre 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 3.0.2 
Target VersionFixed in Version 
Summary0015438: project([...] C) for Objective-C
DescriptionThe following cmake scripts has an implicit (working) behavior for Objective-C++:

project(bla CXX)
add_executable(foo foo.c foo.mm)

However the following (equivalent) code does not seems to be working as I would expect:

project(bla C)
add_executable(foo foo.c foo.m)
Additional InformationWhile Objective-C has never been documented in CMake, it is a required behavior on MacOSX as so many of its API are only accessible through Objective-C.
TagsNo tags attached.
Attached Files

 Relationships
related to 0014516closedKitware Robot Map LANGUAGE source file property to compiler language flag 

  Notes
(0038179)
Mathieu Malaterre (developer)
2015-03-09 04:33

What works for me is:

cmake_minimum_required(VERSION 3.1)
project(bla C)
add_executable(foo foo.c foo.m)
set_source_files_properties(foo.m PROPERTIES LANGUAGE C)
(0038294)
Brad King (manager)
2015-03-25 11:02

Relevant mailing list threads:

 Objective-C support
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9371 [^]

 [patch] treat .m files as c, not c++
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9707 [^]
(0042727)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-03-09 04:13 Mathieu Malaterre New Issue
2015-03-09 04:33 Mathieu Malaterre Note Added: 0038179
2015-03-25 11:00 Brad King Relationship added related to 0014516
2015-03-25 11:02 Brad King Note Added: 0038294
2016-06-10 14:29 Kitware Robot Note Added: 0042727
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team