View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015842 | CMake | CMake | public | 2015-11-10 15:58 | 2016-06-10 14:31 | ||||
Reporter | veeg | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | cygwin | OS | Windows | OS Version | 10 | ||||
Product Version | CMake 3.3.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015842: project() duplicate language / erroneous API usage results in incorrect file endings on object files. | ||||||||
Description | Using the (arguably incorrect format) of the project() command: project (testproj C VERSION 1.0.0 LANGUAGES C) is validated and passes Makefile generation. However, the output file extension for object files results in *.c, and not *.c.o Attached CMakeLists.txt produced the following object file path CMakeFiles/test_executable.dir/test.c When attempted linked into an executable, the compiler thinks the inputfiles are source files, not object files, due the file ending. Therefore, it spews out an endless stream of "stray '\xxx' in program" (gcc does atleast). Not so user friendly to detect what actually went wrong. | ||||||||
Steps To Reproduce | See attached CMakeLists.txt for MWE. * Put attached CMakeLists.txt in empty folder * issue CMake command to build makefiles: ** "cmake ." * Build executable ** "make" Output: [ 50%] Linking C executable test_executable.exe CMakeFiles/test_executable.dir/test.c:1:1: error stray `\206` in program ... ... .. .. .. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeLists.txt [^] (127 bytes) 2015-11-10 15:58 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0039861) Brad King (manager) 2015-11-10 16:11 |
It looks like cmGlobalGenerator::EnableLanguage assumes it is given a list of languages that does not repeat. It is a virtual function so fixing the list needs to be done by the callers. The callers are in Source/cmEnableLanguageCommand.cxx and Source/cmProjectCommand.cxx so one could look at fixing them or adding a helper wrapper for them to call. |
(0042886) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-11-10 15:58 | veeg | New Issue | |
2015-11-10 15:58 | veeg | File Added: CMakeLists.txt | |
2015-11-10 16:11 | Brad King | Note Added: 0039861 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042886 | |
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 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |