picongpu icon indicating copy to clipboard operation
picongpu copied to clipboard

CMake: Disable In-Source Builds

Open ax3l opened this issue 8 years ago • 6 comments

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.

ax3l avatar Jun 20 '17 12:06 ax3l

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 avatar Feb 21 '24 08:02 dappchandu

@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.

psychocoderHPC avatar Feb 21 '24 10:02 psychocoderHPC

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

dappchandu avatar Feb 21 '24 13:02 dappchandu

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.

psychocoderHPC avatar Feb 21 '24 15:02 psychocoderHPC