MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015818 | CMake | CMake | public | 2015-10-28 21:53 | 2016-06-10 14:31 |
| Reporter | maarten | ||||
| Assigned To | Kitware Robot | ||||
| Priority | low | Severity | text | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | Linux | OS | Fedora Linux 22 | OS Version | 22 |
| Product Version | CMake 3.3.2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015818: The variable CMAKE_ASM_OUTPUT_EXTENSION is ignored when creating a compiled file | ||||
| Description | The 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 Reproduce | 1) 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 Information | A simple sdcc config is attached. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/5561/sdcc_asm.zip | ||||
| 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 | ||
| Notes | |||||
|
|
|||||
|
|
||||