Skip to content

Commit

Permalink
Murrrrge
Browse files Browse the repository at this point in the history
  • Loading branch information
RyeMutt committed Sep 10, 2014
2 parents 5059d5e + a5ac768 commit eb96dee
Show file tree
Hide file tree
Showing 266 changed files with 3,057 additions and 2,383 deletions.
6 changes: 2 additions & 4 deletions indra/cmake/00-Common.cmake
Expand Up @@ -53,10 +53,8 @@ if (WINDOWS)
# Remove default /Zm1000 flag that cmake inserts
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

if (MSVC12)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm140")
endif (MSVC12)

# Always use /Zm140
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm140")

# Don't build DLLs.
set(BUILD_SHARED_LIBS OFF)
Expand Down
26 changes: 13 additions & 13 deletions indra/develop.py
Expand Up @@ -169,7 +169,7 @@ def run_cmake(self, args=[]):
raise

def parse_build_opts(self, arguments):
opts, targets = getopt.getopt(arguments, 'o:', ['option='])
opts, targets = getopt.getopt(arguments, 'D:o:', ['option='])
build_opts = []
for o, a in opts:
if o in ('-o', '--option'):
Expand Down Expand Up @@ -612,15 +612,15 @@ def get_build_cmd(self):
if environment == '':
environment = self.find_visual_studio_express()
if environment == '':
environment = self.find_visual_studio_express_single()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)
environment = self.find_visual_studio_express_single()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)

# devenv.com is CLI friendly, devenv.exe... not so much.
return ('"%sdevenv.com" %s.sln /build %s' %
Expand Down Expand Up @@ -662,7 +662,7 @@ def run_vstool(self):
os.path.join(build_dir,'Singularity.sln') +
' --config ' + self.build_type +
' --startup secondlife-bin')
print 'Running %r in %r' % (vstool_cmd, getcwd())
print 'Running vstool %r in %r' % (vstool_cmd, getcwd())
self.run(vstool_cmd)
print >> open(stamp, 'w'), self.build_type

Expand All @@ -676,11 +676,11 @@ def run_build(self, opts, targets):
if targets:
for t in targets:
cmd = '%s /project %s %s' % (build_cmd, t, ' '.join(opts))
print 'Running %r in %r' % (cmd, d)
print 'Running build(targets) %r in %r' % (cmd, d)
self.run(cmd)
else:
cmd = '%s %s' % (build_cmd, ' '.join(opts))
print 'Running %r in %r' % (cmd, d)
print 'Running build %r in %r' % (cmd, d)
self.run(cmd)
finally:
os.chdir(cwd)
Expand Down
12 changes: 6 additions & 6 deletions indra/lib/python/indra/util/llmanifest.py
Expand Up @@ -39,6 +39,7 @@
import sys
import tarfile
import errno
import subprocess

def path_ancestors(path):
drive, path = os.path.splitdrive(os.path.normpath(path))
Expand Down Expand Up @@ -393,20 +394,19 @@ def run_command(self, command):
debugging/informational purpoases, prints out the command's
output as it is received."""
print "Running command:", command
fd = os.popen(command, 'r')
fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
lines = []
while True:
lines.append(fd.readline())
lines.append(fd.stdout.readline())
if lines[-1] == '':
break
else:
print lines[-1],
print lines[-1].rstrip('\n'),
output = ''.join(lines)
status = fd.close()
if status:
if fd.returncode:
raise RuntimeError(
"Command %s returned non-zero status (%s) \noutput:\n%s"
% (command, status, output) )
% (command, fd.returncode, output) )
return output

def created_path(self, path):
Expand Down
3 changes: 3 additions & 0 deletions indra/llcommon/CMakeLists.txt
Expand Up @@ -270,6 +270,9 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES})
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})

add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
if(WINDOWS)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
endif(WINDOWS)
add_dependencies(llcommon prepare)
target_link_libraries(
llcommon
Expand Down
8 changes: 5 additions & 3 deletions indra/llcommon/llregistry.h
Expand Up @@ -307,8 +307,10 @@ class LLRegistrySingleton
virtual ~StaticRegistrar() {}
StaticRegistrar(ref_const_key_t key, ref_const_value_t value)
{
if(!singleton_t::instance().mStaticScope)
mStaticScope = new ScopedRegistrar();
if (singleton_t::instance().exists(key))
{
llerrs << "Duplicate registry entry under key \"" << key << "\"" << llendl;
}
singleton_t::instance().mStaticScope->add(key, value);
}
};
Expand Down Expand Up @@ -338,7 +340,7 @@ class LLRegistrySingleton

virtual void initSingleton()
{
//mStaticScope = new ScopedRegistrar();
mStaticScope = new ScopedRegistrar();
}

virtual ~LLRegistrySingleton()
Expand Down
2 changes: 1 addition & 1 deletion indra/llcommon/llsingleton.cpp
Expand Up @@ -28,5 +28,5 @@

#include "llsingleton.h"

std::map<std::string, void *> * LLSingletonRegistry::sSingletonMap = NULL;
std::map<std::string, void*>* LLSingletonRegistry::sSingletonMap = NULL;

0 comments on commit eb96dee

Please sign in to comment.