Pass in build directory
steveno opened this issue · 7 comments
Would it be possible, or perhaps is it possible, to have the script output to a build
directory instead the project's root directory? I really like the script; I have even included it in my project, but testing with it clogs up my git staging area. Which in turn drives me bonkers.
Just noticed after filing this issue, there was already an issue for it that's closed. Sorry about that.
With that said though, here's what I'm seeing when I try it:
steveno@odrade:~/Projects/balistica/build (master)
$ ll
total 0
steveno@odrade:~/Projects/balistica/build (master)
$ ../configure
-- checking for a minimum Vala version of 0.28.0
-- found Vala, version 0.30.0
-- GSettings schemas will be compiled.
-- GSettings schemas will be compiled in-place.
-- GSettings schemas will be installed into /usr/local/share/glib-2.0/schemas/
-- Configuring done
-- Generating done
-- Build files have been written to: /home/steveno/Projects/balistica
steveno@odrade:~/Projects/balistica/build (master)
$ ll
total 0
steveno@odrade:~/Projects/balistica/build (master)
$ git ss
## master...origin/master
M ../README.md
M ../src/BalisticaApplication.vala
?? ../balistica
?? ../cmake_uninstall.cmake
?? ../gsettings/
?? ../src/BalisticaApplication.c
?? ../src/Calculate.c
?? ../src/FileUtils.c
...
steveno@odrade:~/Projects/balistica/build (master)
$ ../configure
…
-- Build files have been written to: /home/steveno/Projects/balistica
That's strange; definitely not what I see when building Squash. What is your shell? Is the project available somewhere so I can take a look? Can you change the first line from #!/bin/sh
to #!/bin/sh -x
and run it from the build/ subdirectory, and paste the result?
The project is here:
https://github.com/steveno/balistica
I'm starting to wonder if it's perhaps something I've done to one of my CMakeLists.txt
files.
Well, the configure from build dir works for me. Hard to tell whether your CMake configuration writes to the source dir, since make
just results in
[ 3%] Generating LibBalistica/Atmosphere.c;LibBalistica/Greenhill.c;LibBalistica/LibBalistica.c;LibBalistica/Miller.c;LibBalistica/PBR.c;LibBalistica/Retard.c;LibBalistica/Solution.c;LibBalistica/Solve.c;LibBalistica/Windage.c;LibBalistica/Zero.c;LibBalistica/conversion/Angle.c;LibBalistica/conversion/Mass.c;LibBalistica/conversion/Temperature.c;lib-balistica.vapi;lib-balistica.h
gee-0.8.vapi:267.4-267.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:662.4-662.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:664.4-664.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:672.4-672.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
gee-0.8.vapi:674.4-674.13: warning: [Deprecated] is deprecated. Use [Version (deprecated = true, deprecated_since = "", replacement = "")]
Compilation failed: 0 error(s), 5 warning(s)
src/CMakeFiles/lib-balistica.dir/build.make:118: recipe for target 'src/lib-balistica_valac.stamp' failed
make[2]: *** [src/lib-balistica_valac.stamp] Error 1
CMakeFiles/Makefile2:289: recipe for target 'src/CMakeFiles/lib-balistica.dir/all' failed
make[1]: *** [src/CMakeFiles/lib-balistica.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Can you reproduce the issue with configure-cmake from a fresh checkout?
Upon a fresh check out in a new directory it works just it should. I have no idea how or why. I also don't know why the build is failing for you; works for me on an updated Fedora 23. Those errors are strange because it looks like it's crapping on gee not my code.
Closing. Thanks for the help!!
Ah, you have --fatal-warnings in your vala flags. You really shouldn't do that by default. Those warnings from gee are due to a change in vala-0.32… if you have fatal warnings your project will not compile with valac >= 0.32 until libgee is changed.
I suggest you only enable fatal errors only for CI builds, not by default.
Fixed. Thanks again for the extra help!