Hi,

I wanted to play around with the examples provided by llvm-doc.  But I
can't figure out exactly how to compile them.  Using the provided
Makefile seems impossible, it includes several other Makefiles from the
llvm source tree, namely Makefile.{common,config,rules}.  Even if I
manage to copy over two of the files (common and rules) from the
upstream repo, finding the config file seems very difficult.  It is
generated by configure before compilation.  So I decided to use cmake.

This is what I did:

  $ cp -R /usr/share/doc/llvm-doc/examples/Fibonacci /tmp/
  $ mkdir /tmp/Fibonacci/build
  $ pushd /tmp/Fibonacci/build/

edit ../CMakeLists.txt and add the two following lines at the top:

  set(CMAKE_MODULE_PATH /usr/share/llvm/cmake)
  # find_package(LLVM)
  include(AddLLVM)

Running

  $ cmake ..

gives me the following errors:

  CMake Error at /usr/share/llvm/cmake/AddLLVM.cmake:443 (set_output_directory):
    set_output_directory Function invoked with incorrect arguments for function
    named: set_output_directory
  Call Stack (most recent call first):
    /usr/share/llvm/cmake/AddLLVM.cmake:481 (add_llvm_executable)
    CMakeLists.txt:16 (add_llvm_example)

Uncommenting the find_package lines seems to produce even more similar
copious errors.

Anyone has experience with this, ideas?

TIA,

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to