I've got an existing project with a CMake-based build system. The project:
- Has both C and C++ files
- Links some ".o" files into convenience .a files.
- Links some ".o" and ".a" files into several different executables.
- Can be built successfully with gcc or clang.
When using clang, I'd like the build process to *not* directly compile a
C/C++ source file into an object file. Instead, I'd like it to use two
distinct steps:
1. Use "clang -emit-llvm ..." to produce a bitcode (".bc") file.
2. Use "llc" to compile the bitcode file to a native ".o" file.
Does CMake have an idiomatic way to implement this change?
(Worst-case scenario I can create a wrapper script for "clang" which
performs those two steps separately. But I'd rather use the intended
approach if possible.)
- Christian
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake