summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixDefinesRule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUnixDefinesRule.cxx')
-rw-r--r--Source/cmUnixDefinesRule.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmUnixDefinesRule.cxx b/Source/cmUnixDefinesRule.cxx
new file mode 100644
index 0000000..9922d4d
--- /dev/null
+++ b/Source/cmUnixDefinesRule.cxx
@@ -0,0 +1,25 @@
+#include "cmUnixDefinesRule.h"
+
+cmUnixDefinesRule::cmUnixDefinesRule()
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ this->SetEnableOff();
+#endif
+}
+
+// cmUNIXDefinesRule
+bool cmUnixDefinesRule::Invoke(std::vector<std::string>& args)
+{
+ if(args.size() < 1 )
+ {
+ this->SetError("Win32Defines called with incorrect number of arguments");
+ return false;
+ }
+ for(std::vector<std::string>::iterator i = args.begin();
+ i != args.end(); ++i)
+ {
+ m_Makefile->AddDefineFlag((*i).c_str());
+ }
+ return true;
+}
+