View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015818CMakeCMakepublic2015-10-28 21:532016-06-10 14:31
Reportermaarten 
Assigned ToKitware Robot 
PrioritylowSeveritytextReproducibilityalways
StatusclosedResolutionmoved 
PlatformLinuxOSFedora Linux 22OS Version22
Product VersionCMake 3.3.2 
Target VersionFixed in Version 
Summary0015818: The variable CMAKE_ASM_OUTPUT_EXTENSION is ignored when creating a compiled file
DescriptionThe sdcc compiler has ".asm" extensions for the assembly files.
But cmake always assumes the ".s" extension.
https://github.com/Kitware/CMake/blob/d288b216af6864567354ccb05e85466fb57d46b0/Source/cmMakefileTargetGenerator.cxx#L802-L803 [^]

For a source file 'main.c', 'make help' shows the following targets:
... main.rel
... main.i
... main.s

Running 'make main.s' gives the following output:
Compiling C source to assembly CMakeFiles/proj1.dir/main.c.s

But in the CMakeFiles/proj1.dir, there is no 'main.c.s' file.
The generated assembly file is 'main.c.asm'
Steps To Reproduce1) Create toolchain file with:
   - CMAKE_SYSTEM_NAME = Generic
   - CMAKE_ASM_SOURCE_FILE_EXTENSIONS = asm
   - CMAKE_C_C_CREATE_ASSEMBLY_SOURCE = "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>"
   - set CMAKE_C_COMPILER, CMAKE_FIND_ROOT_PATH, ...
2) Create a basic main.c
3) Create CMakeLists.txt, with
   - CMAKE_C_FLAGS = "-Werror --model-small -mmcs51 --opt-code-size"
4) Run CMake to generate the makefiles (using the toolchain)
5) Run "make help" (main.s will show up)
6) Run "make main.s" (main.asm will be created instead of main.s)
7) Run "make main.asm" (An error will be shown)
Additional InformationA simple sdcc config is attached.
TagsNo tags attached.
Attached Fileszip file icon sdcc_asm.zip [^] (967 bytes) 2015-10-28 21:54

 Relationships

  Notes
(0042870)
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-10-28 21:53 maarten New Issue
2015-10-28 21:54 maarten File Added: sdcc_asm.zip
2016-06-10 14:29 Kitware Robot Note Added: 0042870
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