Phil
Joined: 22 May 2007 Posts: 1
|
Posted: Tue May 22, 2007 2:45 pm Post subject: Out of tree builds |
|
|
Hi, I've only just come across cmaked recently, so I've not really had a chance to use it seriously yet. However, I have run into one fairly important thing. Whenever I try to use cmake from outside the source directory the make will fail.
Quote: | phil@explicit:~/Desktop/source/cmaked/samples/Hello$ mkdir build
phil@explicit:~/Desktop/source/cmaked/samples/Hello$ cd build/
phil@explicit:~/Desktop/source/cmaked/samples/Hello/build$ l
phil@explicit:~/Desktop/source/cmaked/samples/Hello/build$ cmake ..
-- Check for working D compiler: /usr/bin/gdc
-- Check for working D compiler: /usr/bin/gdc -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /home/phil/Desktop/source/cmaked/samples/Hello/build
phil@explicit:~/Desktop/source/cmaked/samples/Hello/build$ make
Scanning dependencies of target Hello
[ 50%] Building D object Hello/CMakeFiles/Hello.dir/hello.o
Linking D static library libHello.a
[ 50%] Built target Hello
Scanning dependencies of target helloDemo
[100%] Building D object Demo/CMakeFiles/helloDemo.dir/demo.o
/home/phil/Desktop/source/cmaked/samples/Hello/Demo/demo.d:2: module hello cannot read file 'Hello/hello.d'
make[2]: *** [Demo/CMakeFiles/helloDemo.dir/demo.o] Error 1
make[1]: *** [Demo/CMakeFiles/helloDemo.dir/all] Error 2
make: *** [all] Error 2
phil@explicit:~/Desktop/source/cmaked/samples/Hello/build$ |
This is using linux with gdc, but it also happens using gdmd (the wrapper script with gdc.) Is this just how the compiler works or is it something that could be fixed in cmaked?
I'd really prefer to use cmake in this way, but thankyou for all the work regardless, it's the nicest way to build D code I've found. |
|