[LLVMbugs] [Bug 3072] New: CMake build fails with LLVM in a subdirectory

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Nov 15 09:00:27 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=3072

           Summary: CMake build fails with LLVM in a subdirectory
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: ofv at wanadoo.es
        ReportedBy: hyperquantum at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Building LLVM with CMake fails if LLVM's top-level CMake file is not the
top-level CMake file of the build.

To reproduce:

$ mkdir test
$ cd test
$ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
$ echo "add_subdirectory(llvm)" >CMakeLists.txt
$ cd ..
$ mkdir test_build
$ cd test_build
$ cmake ../test
$ make

The error message:

[ 94%] Built target llvm-config.target
llvm/tools/opt/CMakeFiles/opt.dir/build.make:44:
tools/opt/CMakeFiles/opt.dir/depend.make: No such file or directory
llvm/tools/opt/CMakeFiles/opt.dir/build.make:47:
tools/opt/CMakeFiles/opt.dir/progress.make: No such file or directory
llvm/tools/opt/CMakeFiles/opt.dir/build.make:50:
tools/opt/CMakeFiles/opt.dir/flags.make: No such file or directory
make[2]: *** No rule to make target `tools/opt/CMakeFiles/opt.dir/flags.make'. 
Stop.
make[1]: *** [llvm/tools/opt/CMakeFiles/opt.dir/all] Error 2
make: *** [all] Error 2


Note: I didn't use "svn co" but copied the directory from another SVN checkout.
In theory this shouldn't make a difference. (The SVN revision I used was 59362)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list