Package: openc++ Version: 2.8-4 Severity: normal
Hi,
as reported in : http://sourceforge.net/mailarchive/message.php?msg_id=9785370
Description : occ2 ignores preprocessor options
patch in attached file, successfully tested locally
Regards
-- Mathieu Roger
diff -ur opencxx-2.8/opencxx/driver2.cc opencxx-patched/opencxx/driver2.cc --- opencxx-2.8/opencxx/driver2.cc 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/driver2.cc 2004-10-14 14:49:27.870216699 +0200 @@ -241,9 +241,11 @@ string compiler = config.CompilerCommand(); vector<string> argv; - + argv.push_back(compiler); + argv.insert(argv.end(), config.CppOptions().begin(), config.CppOptions().end()); + if(config.RecognizeOccExtensions()) argv.push_back("-D__opencxx"); diff -ur opencxx-2.8/opencxx/MetacompilerConfiguration.h opencxx-patched/opencxx/MetacompilerConfiguration.h --- opencxx-2.8/opencxx/MetacompilerConfiguration.h 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/MetacompilerConfiguration.h 2004-10-14 14:42:21.060422444 +0200 @@ -20,6 +20,7 @@ #include <opencxx/defs.h> #include <string> #include <memory> +#include <vector> namespace Opencxx { @@ -95,7 +96,7 @@ virtual Opencxx::ErrorLog& ErrorLog() const = 0; virtual Iterator CcOptions() const = 0; - + virtual const std::vector<std::string>& CppOptions() const = 0; virtual Iterator Metaclasses() const = 0; }; diff -ur opencxx-2.8/opencxx/OpencxxConfiguration.h opencxx-patched/opencxx/OpencxxConfiguration.h --- opencxx-2.8/opencxx/OpencxxConfiguration.h 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/OpencxxConfiguration.h 2004-10-14 14:42:32.511592506 +0200 @@ -117,6 +117,9 @@ { cc2Options_.push_back(option); } + const std::vector<std::string>& CppOptions() const { + return cc2Options_; + } void SetDoPreprocess(bool v) { doPreprocess_ = v; } bool DoPreprocess() const { return doPreprocess_; }