diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-27 21:13:45 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-06 18:04:10 (GMT) |
commit | 11093a03e064e1b7ef2d5db28845b5da7b934806 (patch) | |
tree | 6a6bafe49ed6c3d987940e9ff8cb87f2a9c50b44 /Source/cmLocalGenerator.cxx | |
parent | 6cd2ee9524e501a4ef9dc481b469b91f8f022dc9 (diff) | |
download | CMake-11093a03e064e1b7ef2d5db28845b5da7b934806.zip CMake-11093a03e064e1b7ef2d5db28845b5da7b934806.tar.gz CMake-11093a03e064e1b7ef2d5db28845b5da7b934806.tar.bz2 |
Replace temporary bool by inlining warning condition.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bd9cb26..7afe05f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3641,24 +3641,20 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4() bool cmLocalGenerator::CheckDefinition(std::string const& define) const { // Many compilers do not support -DNAME(arg)=sdf so we disable it. - bool function_style = false; - std::string::size_type pos = define.find_first_of("(="); if (pos != std::string::npos) { - function_style = define[pos] == '('; - } - - if(function_style) - { - std::ostringstream e; - e << "WARNING: Function-style preprocessor definitions may not be " - << "passed on the compiler command line because many compilers " - << "do not support it.\n" - << "CMake is dropping a preprocessor definition: " << define << "\n" - << "Consider defining the macro in a (configured) header file.\n"; - cmSystemTools::Message(e.str().c_str()); - return false; + if (define[pos] == '(') + { + std::ostringstream e; + e << "WARNING: Function-style preprocessor definitions may not be " + << "passed on the compiler command line because many compilers " + << "do not support it.\n" + << "CMake is dropping a preprocessor definition: " << define << "\n" + << "Consider defining the macro in a (configured) header file.\n"; + cmSystemTools::Message(e.str().c_str()); + return false; + } } // Many compilers do not support # in the value so we disable it. |