Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

disable support for in-source-tree builds #3451

Closed
markus2330 opened this issue Jun 4, 2020 · 4 comments
Closed

disable support for in-source-tree builds #3451

markus2330 opened this issue Jun 4, 2020 · 4 comments

Comments

@markus2330
Copy link
Contributor

As in-source-tree builds are currently broken and do not seem to be used anyway, I suggest that we remove the FORCE_IN_SOURCE_BUILD and simply always fail on top-level. We can give an hint for CMAKE_BINARY_SUBDIR in the error message (see #3446).

@poldi871
Copy link

poldi871 commented Sep 1, 2020

It saw that OpenWrt uses it, and it seems that it is also necessary for BuildRoot. I just wrote a basic recipe for it, and there the build fails without it.
Unfortunately I'm not a cmake specialist -> use it often, but up to now never built a project with it.
If there would be an elegant workaround remove it ;-)

@markus2330
Copy link
Contributor Author

I am a bit confused here: OpenWRT now afaik does not use FORCE_IN_SOURCE_BUILD anymore but your recipe #3472 used FORCE_IN_SOURCE_BUILD but also LIBELEKTRA_SUPPORTS_IN_SOURCE_BUILD=NO.

So is -DFORCE_IN_SOURCE_BUILD=ON in your recipe actually needed? This issue is about removing the support for FORCE_IN_SOURCE_BUILD.

@poldi871
Copy link

poldi871 commented Sep 3, 2020

Oops, I was frightened, because I detected, that I used the recipe of a Web-Page from 02.02.2020 related to OpenWrt-18.x.
As I mentioned my recipe is "still very dirty". Now I checked out OpenWrt's feed-tree. If I haven't made a mistake the last change was on 09.06.2020 and the recipe with that status is:

CMAKE_OPTIONS = \
	-DTARGET_PLUGIN_FOLDER="" \
	-DBUILD_FULL=OFF \
	-DBUILD_STATIC=OFF \
	-DBUILD_DOCUMENTATION=OFF \
	-DFORCE_IN_SOURCE_BUILD=ON \     <==========================
	-DBUILD_TESTING=OFF \
	-DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
	-DKDB_DEFAULT_STORAGE=ini \
	-DENABLE_OPTIMIZATIONS=OFF \
	-DPLUGINS="ALL;-multifile;-simpleini;-internalnotification" \
	-DIconv_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
	-DIconv_LIBRARY="$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)" \
	-DBINDINGS="MAINTAINED;-intercept_env;-intercept_fs;-io_uv;-io_ev;-io_glib"

Pse correct me, if I'm still wrong.

Concerning the BuildRoot recipe it's a little crazy and I admit, at the moment the setting of LIBELEKTRA_SUPPORTS_IN_SOURCE_BUILD=NO is a product of nearly "try and error".
I studied the backend recipe of BuildRoot. There the default is switched to "YES". Exactly when switching this value to "NO" leads to the creation of a directory ".../buildroot-build", where the library will be built. Without switching this value the build fails. Because I cannot understand that either, i've put it on my checklist for a later detailed examination. At the moment I have a different focus.

@kodebach kodebach added cm2022s for university course and removed cm2022s for university course labels Mar 3, 2021
@markus2330
Copy link
Contributor Author

So let us keep FORCE_IN_SOURCE_BUILD

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants