Hi Torsten, Thanks for the info, but CMake 2.6.4 doesn't solve my problem. I must be doing something wrong, but I haven't found out yet what exactly. I'll continue digging.
Best regards, Marcel Loose. -----Original Message----- From: Torsten Maehne <[email protected]> To: [email protected] Subject: Re: [CMake] Problem with ASM and COMPILE_DEFINITIONS Date: Wed, 27 May 2009 10:04:47 +0200 Hello Marcel, you've stumpled on a bug in CMake <http://www.cmake.org/Bug/view.php?id=8107>, which has been fixed in CMake 2.6.4. Best regards, Torsten Marcel Loose schrieb: > Hi all, > > I have a problem compiling assembly files. I followed the directions on > the Wiki http://www.cmake.org/Wiki/CMake/Assembler to create the > required CMake files. > > I get compilation errors, because CMake passes -D<def> definitions to > the assembler, but the assembler doesn't accept preprocessor > definitions. These definitions were set a number of directory levels > higher, using add_definitions(). How can I avoid that these definitions > are put on the command line to the assembler? > > Here is a simple example CMakeLists.txt file that exhibits the same > behavior. > > $ cat ../CMakeLists.txt > project(MyProject) > cmake_minimum_required(VERSION 2.6) > add_definitions("-DMYDEF -DMYOTHERDEF") > enable_language(ASM-ATT) > add_executable(myexec myexec.S) > > $ cmake .. > -- The C compiler identification is GNU > -- The CXX compiler identification is GNU > -- Check for working C compiler: /usr/bin/gcc > -- Check for working C compiler: /usr/bin/gcc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler: /usr/bin/c++ > -- Check for working CXX compiler: /usr/bin/c++ -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Found assembler: /usr/bin/as > -- Loaded CMakeASM-ATTInformation - ASM-ATT support is still > experimental, please report issues > -- Configuring done > -- Generating done > -- Build files have been written to: /tmp/loose/LOFAR/build > > $ make VERBOSE=1 > /usr/bin/cmake -H/tmp/loose/LOFAR -B/tmp/loose/LOFAR/build > --check-build-system CMakeFiles/Makefile.cmake 0 > /usr/bin/cmake -E > cmake_progress_start /tmp/loose/LOFAR/build/CMakeFiles > /tmp/loose/LOFAR/build/CMakeFiles/progress.make > make -f CMakeFiles/Makefile2 all > make[1]: Entering directory `/tmp/loose/LOFAR/build' > make -f CMakeFiles/myexec.dir/build.make CMakeFiles/myexec.dir/depend > make[2]: Entering directory `/tmp/loose/LOFAR/build' > cd /tmp/loose/LOFAR/build && /usr/bin/cmake -E cmake_depends "Unix > Makefiles" /tmp/loose/LOFAR /tmp/loose/LOFAR /tmp/loose/LOFAR/build > /tmp/loose/LOFAR/build > /tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/DependInfo.cmake --color= > Dependee "/tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/DependInfo.cmake" > is newer than depender > "/tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/depend.internal". > Scanning dependencies of target myexec > make[2]: Leaving directory `/tmp/loose/LOFAR/build' > make -f CMakeFiles/myexec.dir/build.make CMakeFiles/myexec.dir/build > make[2]: Entering directory `/tmp/loose/LOFAR/build' > /usr/bin/cmake -E > cmake_progress_report /tmp/loose/LOFAR/build/CMakeFiles 1 > [100%] Building ASM-ATT object CMakeFiles/myexec.dir/myexec.S.o > /usr/bin/as -DMYDEF -DMYOTHERDEF -o > CMakeFiles/myexec.dir/myexec.S.o /tmp/loose/LOFAR/myexec.S > /usr/bin/as: unrecognized option '-YDEF' > make[2]: *** [CMakeFiles/myexec.dir/myexec.S.o] Error 1 > make[2]: Leaving directory `/tmp/loose/LOFAR/build' > make[1]: *** [CMakeFiles/myexec.dir/all] Error 2 > make[1]: Leaving directory `/tmp/loose/LOFAR/build' > make: *** [all] Error 2 > > > Best regards, > Marcel Loose. > > > _______________________________________________ > 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://www.cmake.org/mailman/listinfo/cmake > _______________________________________________ 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://www.cmake.org/mailman/listinfo/cmake _______________________________________________ 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://www.cmake.org/mailman/listinfo/cmake
