Skip to content
Snippets Groups Projects
Commit 9322babc authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

PreventInSourceBuilds.cmake: + header, for external use

parent d3858cb1
No related branches found
No related tags found
1 merge request!361Merge master to get updated file header comment
Pipeline #45642 passed
# - Prevent in-source builds.
# PreventInSourceBuilds.cmake
#
# Forbids in-source builds.
#
# Rationale:
# There is no good reason to run CMake from the main source directory,
# as this would mess up the directory with compilation output.
# If CMake is nonetheless run in-source, then this is most likely by accident.
# This script is meant to prevent this specific accident.
#
# Usage:
# Insert the line "include(PreventInSourceBuilds)" near the top
# of the top-level CMakeLists.txt.
#
# License:
# No rights reserved (CC0).
#
# Author:
# Scientific Computing Group of JCNS-MLZ.
#
# Copyright:
# Forschungszentrum Jülich GmbH 2021
function(prevent_in_source_builds)
# make sure the user doesn't play dirty with symlinks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment