I am trying to produce the .s file that "g++ -S file.cpp" would
produce, but on a CMake target (because I want the include path that
I've setup through CMake, etc.)

Consider a simple demo:

PROJECT(Assembly)
ADD_EXECUTABLE(Assembly Assembly.cpp ) # this produces an 'Assembly' executable

I tried to do this:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -S")

but I get:

Linking CXX executable AssemblyAssembly
c++: warning: CMakeFiles/Assembly.dir/Assembly.cpp.o: linker input
file unused because linking not done

I also tried:

set_target_properties(Assembly PROPERTIES COMPILE_FLAGS "-S")

but I get:

"file format not recognized; treating as linker script"

Any suggestions on how to do this?

Thanks,

David
--

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

Reply via email to