mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Use cascading-if for per-config test and install code
When generating per-config blocks in test and install scripts replace
the form
IF()
# config == A
ENDIF()
IF()
# config == B
ENDIF()
with
IF()
# config == A
ELSEIF()
# config == B
ELSE()
# no config matches
ENDIF()
for clarity and to support the else() case cleanly.
This commit is contained in:
@@ -65,6 +65,8 @@ protected:
|
||||
virtual void GenerateScriptForConfig(std::ostream& os,
|
||||
const char* config,
|
||||
Indent const& indent);
|
||||
virtual void GenerateScriptNoConfig(std::ostream&, Indent const&) {}
|
||||
virtual bool NeedsScriptNoConfig() const { return false; }
|
||||
|
||||
// Test if this generator does something for a given configuration.
|
||||
bool GeneratesForConfig(const char*);
|
||||
|
||||
Reference in New Issue
Block a user