More vc2010 stuff (part deux)

This commit is contained in:
unknown
2010-10-07 21:23:50 -05:00
parent 227a72c421
commit 49e4959bf5
8 changed files with 40 additions and 12 deletions

View File

@@ -53,10 +53,9 @@ if (WINDOWS)
/Zc:forScope
/nologo
/Oy-
/Zc:wchar_t- #wchar_t is now on by default in VS2010. Force it to be disabled.
)
if(MSVC80 OR MSVC90)
if(MSVC80 OR MSVC90 OR MSVC100)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
CACHE STRING "C++ compiler release options" FORCE)
@@ -67,7 +66,7 @@ if (WINDOWS)
add_definitions(
/Zc:wchar_t-
)
endif (MSVC80 OR MSVC90)
endif (MSVC80 OR MSVC90 OR MSVC100)
# Are we using the crummy Visual Studio KDU build workaround?
if (NOT VS_DISABLE_FATAL_WARNINGS)

View File

@@ -36,6 +36,16 @@ else (STANDALONE)
set(BOOST_SIGNALS_LIBRARY
optimized libboost_signals-vc90-mt-${BOOST_VERSION}
debug libboost_signals-vc90-mt-gd-${BOOST_VERSION})
elseif (MSVC100)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-vc100-mt-${BOOST_VERSION}
debug libboost_program_options-vc100-mt-gd-${BOOST_VERSION})
set(BOOST_REGEX_LIBRARY
optimized libboost_regex-vc100-mt-${BOOST_VERSION}
debug libboost_regex-vc100-mt-gd-${BOOST_VERSION})
set(BOOST_SIGNALS_LIBRARY
optimized libboost_signals-vc100-mt-${BOOST_VERSION}
debug libboost_signals-vc100-mt-gd-${BOOST_VERSION})
endif (MSVC80)
elseif (DARWIN)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)

View File

@@ -38,6 +38,9 @@
#include "llnotifications.h"
#include <algorithm>
#if LL_MSVC
#pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual"
#endif
#include <boost/regex.hpp>

View File

@@ -100,6 +100,7 @@ class LLCLPValue : public po::value_semantic_codecvt_helper<char>
unsigned mMinTokens;
unsigned mMaxTokens;
bool mIsComposing;
bool mIsRequired;
typedef boost::function1<void, const LLCommandLineParser::token_vector_t&> notify_callback_t;
notify_callback_t mNotifyCallback;
bool mLastOption;
@@ -108,6 +109,7 @@ public:
LLCLPValue() :
mMinTokens(0),
mMaxTokens(0),
mIsRequired(false),
mIsComposing(false),
mLastOption(false)
{}
@@ -139,6 +141,10 @@ public:
mNotifyCallback = f;
}
void setRequired(bool c)
{
mIsRequired = c;
}
// Overrides to support the value_semantic interface.
virtual std::string name() const
{
@@ -177,7 +183,10 @@ public:
}
}
virtual bool is_required(void) const
{
return mIsRequired;
}
protected:
void xparse(boost::any& value_store,
const std::vector<std::string>& new_tokens) const
@@ -244,17 +253,13 @@ void LLCommandLineParser::addOptionDesc(const std::string& option_name,
value_desc->setComposing(composing);
value_desc->setLastOption(last_option);
boost::shared_ptr<po::option_description> d(
new po::option_description(boost_option_name.c_str(),
value_desc,
description.c_str()));
if(!notify_callback.empty())
{
value_desc->setNotifyCallback(notify_callback);
}
gOptionsDesc.add(d);
po::options_description_easy_init gEasyInitDesc(&gOptionsDesc);
gEasyInitDesc(boost_option_name.c_str(),value_desc, description.c_str());
if(positional)
{

View File

@@ -35,6 +35,9 @@
#include <iostream>
#include <fstream>
#if LL_MSVC
#pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual"
#endif
#include <boost/regex.hpp>
#include "llfeaturemanager.h"

View File

@@ -64,6 +64,9 @@
#include "llassetuploadresponders.h"
#if LL_MSVC
#pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual"
#endif
#include <boost/regex.hpp> //boost.regex lib
///----------------------------------------------------------------------------

View File

@@ -54,6 +54,9 @@
#include "llfloaterdirectory.h"
#include "llfloatergroupinfo.h"
#include "lluictrlfactory.h"
#if LL_MSVC
#pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual"
#endif
#include <boost/regex.hpp>

View File

@@ -83,6 +83,9 @@
// parent
#include "llfloaterpreference.h"
#if LL_MSVC
#pragma warning( disable : 4265 ) // "class has virtual functions, but destructor is not virtual"
#endif
#include <boost/regex.hpp>
const F32 MAX_USER_FAR_CLIP = 512.f;
@@ -819,7 +822,6 @@ bool LLPanelDisplay::extractWindowSizeFromString(const std::string& instr, U32 &
height = atoi(what[2].first);
return true;
}
width = height = 0;
return false;
}