Skip to content

Commit ea995b4

Browse files
author
ayla
committed
Merge master.
2 parents 1f9de84 + 2e814e0 commit ea995b4

File tree

647 files changed

+34187
-7167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

647 files changed

+34187
-7167
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sudo: required
12
language:
23
- cpp
34

@@ -34,9 +35,7 @@ install:
3435
# hopefully make OS X builds a bit faster
3536
script:
3637
- cd bin
37-
- cmake -DDOWNLOAD_TOOLKITS:BOOL=OFF -DRUN_BASIC_REGRESSION_TESTS:BOOL=OFF ../Superbuild
38-
- make -j4
39-
- cmake -DDOWNLOAD_TOOLKITS:BOOL=OFF -DRUN_BASIC_REGRESSION_TESTS:BOOL=OFF ../Superbuild # factory config needs 2 cmakes ?!?
38+
- cmake -DDOWNLOAD_TOOLKITS:BOOL=OFF -DRUN_BASIC_REGRESSION_TESTS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF ../Superbuild
4039
- make -j4
4140
# make SCIRunTestData_external
4241
# && make test

Superbuild/Superbuild.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ OPTION(BUILD_TESTING "Build with tests." ON)
7171
OPTION(BUILD_WITH_PYTHON "Build with python support." ON)
7272

7373
###########################################
74-
# Configure python
75-
OPTION(WITH_TETGEN "Build Tetgen." ON)
76-
MARK_AS_ADVANCED(WITH_TETGEN)
74+
# Configure tetgen
75+
OPTION(WITH_TETGEN "Build Tetgen." OFF)
7776

7877
###########################################
7978
# Configure Windows executable to run with

Superbuild/TetgenExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
2828
ExternalProject_Add(Tetgen_external
29-
URL "http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz"
29+
URL "http://www.tetgen.org/1.5/src/tetgen1.5.1-beta1.tar.gz"
3030
PATCH_COMMAND ""
3131
INSTALL_COMMAND ""
3232
CMAKE_CACHE_ARGS

build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ printhelp() {
6363
echo -e "--verbose\t\tTurn on verbose build"
6464
# echo -e "--set-osx-version-min\tTarget a minimum Mac OS X version (currently ${OSX_TARGET_VERSION}, ${OSX_TARGET_ARCH}) [OS X only]"
6565
# echo -e "--xcode-build\t\tConfigure and build Xcode project against ALL_BUILD target [OS X only]"
66+
echo -e "--with-tetgen\t\tBuild SCIRun with Tetgen library"
6667
echo -e "--cmake=<path to cmake>\t\tUse given CMake"
6768
echo -e "--cmake-args=<cmake args>\t\tUse given CMake args"
6869
echo -e "--documentation\t\tEnable building documentation (requires LaTeX)"
@@ -169,7 +170,7 @@ find_cmake() {
169170

170171
# handle both types of OS X generators
171172
configure_scirun_osx() {
172-
local build_opts=$1
173+
local build_opts=$@
173174

174175
if [[ $setosxmin -eq 1 ]]; then
175176
build_opts="${build_opts} -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_TARGET_VERSION} -DCMAKE_OSX_SYSROOT:PATH=${OSX_TARGET_VERSION_SDK} -DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_TARGET_ARCH}"
@@ -184,7 +185,7 @@ configure_scirun_osx() {
184185

185186
# generic Unix makefile build
186187
configure_scirun_make() {
187-
local build_opts=$1
188+
local build_opts=$@
188189

189190
build_opts="${build_opts} -DCMAKE_BUILD_TYPE:STRING=${buildtype} -DCMAKE_VERBOSE_MAKEFILE:BOOL=${verbosebuild}"
190191

@@ -198,7 +199,7 @@ configure_scirun() {
198199
fi
199200
try cd $builddir
200201

201-
local COMMON_BUILD_OPTS="-DBUILD_DOCUMENTATION:BOOL=$documentation"
202+
local COMMON_BUILD_OPTS="-DWITH_TETGEN:BOOL=$tetgenbuild -DBUILD_DOCUMENTATION:BOOL=$documentation"
202203

203204
if [[ $osx -eq 1 ]]; then
204205
configure_scirun_osx $COMMON_BUILD_OPTS
@@ -268,6 +269,8 @@ verbosebuild="OFF"
268269
builddir="$DIR/bin"
269270
xcodebuild=0
270271
documentation="OFF"
272+
# currently off by default
273+
tetgenbuild="OFF"
271274

272275
echo "Parsing arguments..."
273276
while [[ $1 != "" ]]; do
@@ -308,6 +311,8 @@ while [[ $1 != "" ]]; do
308311
else
309312
echo "WARNING: Only OS X supports the --xcode-build flag."
310313
fi;;
314+
--with-tetgen)
315+
tetgenbuild="ON";;
311316
--documentation)
312317
documentation="ON";;
313318
-j*)

src/CMake/Modules/MacOSXBundleInfo.plist.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<true/>
3333
<key>NSHumanReadableCopyright</key>
3434
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
35+
<key>NSHighResolutionCapable</key>
36+
<true/>
3537
<key>CFBundleDocumentTypes</key>
3638
<array>
3739
<dict>

src/CMakeLists.txt

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ MESSAGE(STATUS "Configuring CPMs")
353353
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
354354

355355
# CPM Setup.
356-
#set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/Externals/cpm-packages" CACHE TYPE STRING)
357-
set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm-packages" CACHE TYPE STRING)
356+
set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm" CACHE TYPE STRING)
358357
find_package(Git)
359358
if(NOT GIT_FOUND)
360359
message(FATAL_ERROR "CPM requires Git.")
@@ -424,7 +423,7 @@ CPM_AddModule("es_general"
424423
# ++ MODULE: Entity System Rendering.
425424
CPM_AddModule("es_render"
426425
GIT_REPOSITORY "https://github.com/CIBC-Internal/cpm-es-render"
427-
GIT_TAG "origin/AddFBO"
426+
GIT_TAG "origin/FontTextures"
428427
USE_EXISTING_VER TRUE)
429428

430429
# ++ MODULE: Acorn
@@ -453,6 +452,7 @@ MESSAGE(STATUS "Done configuring CPMs")
453452
# Copy Spire-SCIRun specific assets and shaders
454453

455454
set(OUTPUT_SHADER_DIR ${CMAKE_CURRENT_BINARY_DIR}/Shaders)
455+
set(OUTPUT_FONT_DIR ${CMAKE_CURRENT_BINARY_DIR}/Fonts)
456456
set(OUTPUT_ASSET_DIR ${CMAKE_CURRENT_BINARY_DIR}/Assets)
457457

458458
function (CopyShaders src_shader_dir dest_shader_dir)
@@ -465,6 +465,16 @@ function (CopyShaders src_shader_dir dest_shader_dir)
465465
endif()
466466
endfunction()
467467

468+
function (CopyFonts src_font_dir dest_font_dir)
469+
if (NOT dest_font_dir STREQUAL "")
470+
file(COPY ${src_font_dir}/ DESTINATION ${dest_font_dir}
471+
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
472+
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
473+
GROUP_READ GROUP_EXECUTE
474+
WORLD_READ WORLD_EXECUTE)
475+
endif()
476+
endfunction()
477+
468478
function (CopyAssets src_asset_dir dest_asset_dir)
469479
if (NOT dest_asset_dir STREQUAL "")
470480
file(COPY ${src_asset_dir}/ DESTINATION ${dest_asset_dir}
@@ -481,6 +491,12 @@ else()
481491
message(WARNING "Not copying shader files. OUTPUT_SHADER_DIR variable not found.")
482492
endif()
483493

494+
if (DEFINED OUTPUT_FONT_DIR)
495+
CopyFonts(${CMAKE_CURRENT_SOURCE_DIR}/Interface/Modules/Render/ES/fonts ${OUTPUT_FONT_DIR})
496+
else()
497+
message(WARNING "Not copying font files. OUTPUT_FONT_DIR variable not found.")
498+
endif()
499+
484500
if (DEFINED OUTPUT_ASSET_DIR)
485501
CopyAssets(${CMAKE_CURRENT_SOURCE_DIR}/Interface/Modules/Render/ES/assets ${OUTPUT_ASSET_DIR})
486502
else()

src/Core/Algorithms/Base/AlgorithmBase.cc

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace
7373

7474
Variable::Variable(const Name& name, const Value& value) : name_(name)
7575
{
76-
setValue(value);
76+
Variable::setValue(value);
7777
}
7878

7979
void Variable::setValue(const Value& val)
@@ -134,13 +134,6 @@ double AlgorithmParameter::toDouble() const
134134
return v ? *v : toInt();
135135
}
136136

137-
std::vector<double> AlgorithmParameter::toDoubleVector() const
138-
{
139-
return {};
140-
// const std::vector<double>* v = boost::get<std::vector<double>>(&value_);
141-
// return v ? *v : std::vector<double>();
142-
}
143-
144137
std::string AlgorithmParameter::toString() const
145138
{
146139
const std::string* v = boost::get<std::string>(&value_);
@@ -334,14 +327,14 @@ DatatypeHandle& AlgorithmData::operator[](const Name& name)
334327
return vec[0];
335328
}
336329

337-
void AlgorithmParameterList::add_option(const AlgorithmParameterName& key, const std::string& defval, const std::string& options)
330+
void AlgorithmParameterList::addOption(const AlgorithmParameterName& key, const std::string& defval, const std::string& options)
338331
{
339332
std::set<std::string> opts;
340333
boost::split(opts, options, boost::is_any_of("|"));
341334
parameters_[key] = AlgorithmParameter(key, AlgoOption(defval, opts));
342335
}
343336

344-
bool AlgorithmParameterList::set_option(const AlgorithmParameterName& key, const std::string& value)
337+
bool AlgorithmParameterList::setOption(const AlgorithmParameterName& key, const std::string& value)
345338
{
346339
auto paramIt = parameters_.find(key);
347340

@@ -363,7 +356,7 @@ bool AlgorithmParameterList::keyNotFoundPolicy(const AlgorithmParameterName& key
363356
BOOST_THROW_EXCEPTION(AlgorithmParameterNotFound() << Core::ErrorMessage("Algorithm has no parameter/option with name " + key.name_));
364357
}
365358

366-
bool AlgorithmParameterList::get_option(const AlgorithmParameterName& key, std::string& value) const
359+
bool AlgorithmParameterList::getOption(const AlgorithmParameterName& key, std::string& value) const
367360
{
368361
auto paramIt = parameters_.find(key);
369362

@@ -374,17 +367,17 @@ bool AlgorithmParameterList::get_option(const AlgorithmParameterName& key, std::
374367
return true;
375368
}
376369

377-
std::string AlgorithmParameterList::get_option(const AlgorithmParameterName& key) const
370+
std::string AlgorithmParameterList::getOption(const AlgorithmParameterName& key) const
378371
{
379372
std::string value;
380-
get_option(key, value);
373+
getOption(key, value);
381374
return value;
382375
}
383376

384-
bool AlgorithmParameterList::check_option(const AlgorithmParameterName& key, const std::string& value) const
377+
bool AlgorithmParameterList::checkOption(const AlgorithmParameterName& key, const std::string& value) const
385378
{
386379
std::string currentValue;
387-
get_option(key, currentValue);
380+
getOption(key, currentValue);
388381
return boost::iequals(value, currentValue);
389382
}
390383

src/Core/Algorithms/Base/AlgorithmBase.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ namespace Algorithms {
4444
{
4545
public:
4646
virtual ~AlgorithmBase();
47-
AlgorithmOutput run(const AlgorithmInput& input) const { return run_generic(input); }
4847
protected:
4948
void dumpAlgoState() const;
5049
};

src/Core/Algorithms/Base/AlgorithmData.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ namespace Algorithms {
9797
VariableHandle additionalAlgoOutput_;
9898
};
9999

100-
typedef boost::shared_ptr<AlgorithmInput> AlgorithmInputHandle;
101-
typedef boost::shared_ptr<AlgorithmOutput> AlgorithmOutputHandle;
100+
typedef Datatypes::SharedPointer<AlgorithmInput> AlgorithmInputHandle;
101+
typedef Datatypes::SharedPointer<AlgorithmOutput> AlgorithmOutputHandle;
102102

103103
}}}
104104

src/Core/Algorithms/Base/AlgorithmFwd.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
#ifndef ALGORITHMS_BASE_ALGORITHMFWD_H
3030
#define ALGORITHMS_BASE_ALGORITHMFWD_H
3131

32-
#include <boost/shared_ptr.hpp>
32+
#include <Core/Datatypes/DatatypeFwd.h>
3333
#include <Core/Algorithms/Base/share.h>
3434

3535
namespace SCIRun {
3636
namespace Core {
3737
namespace Algorithms {
3838

3939
class AlgorithmBase;
40-
typedef boost::shared_ptr<AlgorithmBase> AlgorithmHandle;
40+
typedef Datatypes::SharedPointer<AlgorithmBase> AlgorithmHandle;
4141

4242
class AlgorithmFactory;
43-
typedef boost::shared_ptr<AlgorithmFactory> AlgorithmFactoryHandle;
43+
typedef Datatypes::SharedPointer<AlgorithmFactory> AlgorithmFactoryHandle;
4444

4545
}}}
4646

0 commit comments

Comments
 (0)