diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2020-03-06 13:30:01 (GMT) |
---|---|---|
committer | Sylvain Joubert <joubert.sy@gmail.com> | 2020-03-06 15:40:26 (GMT) |
commit | dc008095961fe4c2478d575931e8caf6c9bff92d (patch) | |
tree | d468b514eca32bf28351b91f41628ab8be64ca36 /Source/cmFindBase.cxx | |
parent | cc070e66cd9bd0d4e0ce56ad9dd307dbb854e61f (diff) | |
download | CMake-dc008095961fe4c2478d575931e8caf6c9bff92d.zip CMake-dc008095961fe4c2478d575931e8caf6c9bff92d.tar.gz CMake-dc008095961fe4c2478d575931e8caf6c9bff92d.tar.bz2 |
find_*: Add support for REQUIRED keyword
In the same spirit as the REQUIRED keyword on find_package, this will
stop cmake execution with an error on a failed find_program, find_file,
find_path or find_library.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r-- | Source/cmFindBase.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index a1feeee..fb09b33 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -111,6 +111,10 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn) } else if (args[j] == "NO_SYSTEM_PATH") { doing = DoingNone; this->NoDefaultPath = true; + } else if (args[j] == "REQUIRED") { + doing = DoingNone; + this->Required = true; + newStyle = true; } else if (this->CheckCommonArgument(args[j])) { doing = DoingNone; } else { |