forked from Expander/FlexibleSUSY
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create macro to avoid code duplication
- Loading branch information
Alexander Voigt
authored and
Alexander Voigt
committed
Mar 30, 2018
1 parent
9b315b5
commit 580e6c8
Showing
2 changed files
with
17 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
macro(find_optional_package name enable_name) | ||
if(${enable_name}) | ||
find_package(${name}) | ||
if(${name}_FOUND) | ||
message(STATUS "Enabling use of ${name}") | ||
else() | ||
unset(${enable_name}) | ||
message(STATUS "Disabling use of ${name}") | ||
endif() | ||
endif() | ||
endmacro() |