Skip to content
Snippets Groups Projects
Commit 7eb5965e authored by Dominic Kempf's avatar Dominic Kempf Committed by Carsten Gräser
Browse files

[CMake][Release] Dont build modules that were disabled through cmake flags


For discussion check FS1648.

Disabling a cmake module through CMAKE_DISABLE_FIND_PACKAGE_...
was only partially working:
- Any module suggesting the disabled module would not search for it
- dunecontrol did not have this knowledge and built the disabled module nevertheless

This commit fixes the latter.

(cherry picked from commit 8b04df71)
Signed-off-by: default avatarCarsten Gräser <graeser@dune-project.org>
parent 6f171412
No related branches found
No related tags found
1 merge request!2512017-05 merge of upstream repository
......@@ -556,6 +556,14 @@ macro(dune_project)
set(ProjectVersionRevision "${DUNE_VERSION_REVISION}")
set(ProjectMaintainerEmail "${DUNE_MAINTAINER}")
# check whether this module has been explicitly disabled through the cmake flags.
# If so, stop the build. This is necessary because dunecontrol does not parse
# the given CMake flags for a disabled Dune modules.
if(CMAKE_DISABLE_FIND_PACKAGE_${ProjectName})
message("Module ${ProjectName} has been explicitly disabled through the cmake flags. Skipping build.")
return()
endif()
define_property(GLOBAL PROPERTY DUNE_MODULE_LIBRARIES
BRIEF_DOCS "List of libraries of the module. DO NOT EDIT!"
FULL_DOCS "List of libraries of the module. Used to generate CMake's package configuration files. DO NOT EDIT!")
......
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