Skip to content
Snippets Groups Projects
Commit 8b04df71 authored by Dominic Kempf's avatar Dominic Kempf
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.
parent fb1ce0b4
No related branches found
No related tags found
No related merge requests found
......@@ -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