CMake: Disable In-Source Builds
We currently disable in-source-builds manually, but I just found in gearshifft that there are actual CMake build-in options for this:
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
One might need to write to the list and ask why they are undocumented before using it, so we don't rely on an unstable feature.
I want to set off set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) while using the vsomeip library else i want to keep it ON . Can you help me with this if possible
@dappchandu Could you please explain your workflow and why do you like to compile within the source code. Currently we do not have a switch to allow compiling within the source code. The reason is that if you call e.g. cmake directly cmake will create temporary files in the source code and this leads to side effects which are hard to debug. Normally it is not a good practice to compile within the source but maybe we missed an important workflow.
For adding vsomeip as git submodule we need to keep the ,cmake source as OFF , can we switch between the OFF and ON in cmakelists.txt
Is your question related to PIConGPU or CMake in general? I am asking because I am wondering what you do with vsomeip and PIConGPU. I would like to understand more about your goal.
Currently disabling is only possible if https://github.com/ComputationalRadiationPhysics/picongpu/blob/52f3e38cb9de7c8917658a2d17687b393cd2a18d/include/picongpu/CMakeLists.txt#L126-L143 will be removed. We could think about a CMake Variable to disable the check if requested by the user.