The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14401 ====================================================================== Reported By: Pawel Defee Assigned To: ====================================================================== Project: CMake Issue ID: 14401 Category: CMake Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2013-09-12 09:29 EDT Last Modified: 2013-09-12 09:29 EDT ====================================================================== Summary: CMake incorrectly passes C/CXX flags to assembler Description: When building mixed C/CXX/ASM projects, CMake incorrectly passes C/CXX compiler options to assembler. On some platform (standard X86 GNU compilers), this is not an issue, but in my case where I cross-compile on X86 for ARM target, the assembler refuses to compile due to invalid options as follows:
[user@host temp]$ make Scanning dependencies of target asmbug [ 50%] Building CXX object CMakeFiles/asmbug.dir/main.cpp.obj [100%] Building ASM object CMakeFiles/asmbug.dir/asmfunction.S.obj /usr/local/embedded-cross-compilers/arm-eabi-as: unrecognized option '-O3' make[2]: *** [CMakeFiles/asmbug.dir/asmfunction.S.obj] Error 1 make[1]: *** [CMakeFiles/asmbug.dir/all] Error 2 make: *** [all] Error 2 Steps to Reproduce: Run CMake on the attached example project. This requires an arm cross compilation toolchain to be installed. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-09-12 09:29 Pawel Defee New Issue 2013-09-12 09:29 Pawel Defee File Added: asmbug.tar ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
