Skip to content

Commit 0e8fd89

Browse files
author
ayla
committed
Merge remote-tracking branch 'origin/master' into headless_build_fix
2 parents 264b146 + f2f81de commit 0e8fd89

File tree

323 files changed

+23352
-3907
lines changed

Some content is hidden

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

323 files changed

+23352
-3907
lines changed

Superbuild/FreetypeExternal.cmake

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# For more information, please see: http://software.sci.utah.edu
2+
#
3+
# The MIT License
4+
#
5+
# Copyright (c) 2015 Scientific Computing and Imaging Institute,
6+
# University of Utah.
7+
#
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a
10+
# copy of this software and associated documentation files (the "Software"),
11+
# to deal in the Software without restriction, including without limitation
12+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
13+
# and/or sell copies of the Software, and to permit persons to whom the
14+
# Software is furnished to do so, subject to the following conditions:
15+
#
16+
# The above copyright notice and this permission notice shall be included
17+
# in all copies or substantial portions of the Software.
18+
#
19+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25+
# DEALINGS IN THE SOFTWARE.
26+
27+
SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
28+
SET(freetype_GIT_TAG "origin/seg3d_external_test")
29+
30+
# If CMake ever allows overriding the checkout command or adding flags,
31+
# git checkout -q will silence message about detached head (harmless).
32+
ExternalProject_Add(Freetype_external
33+
GIT_REPOSITORY "https://github.com/CIBC-Internal/freetype.git"
34+
GIT_TAG ${freetype_GIT_TAG}
35+
PATCH_COMMAND ""
36+
INSTALL_DIR ""
37+
INSTALL_COMMAND ""
38+
CMAKE_CACHE_ARGS
39+
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
40+
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
41+
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
42+
)
43+
44+
ExternalProject_Get_Property(Freetype_external BINARY_DIR)
45+
SET(Freetype_DIR ${BINARY_DIR} CACHE PATH "")
46+
47+
MESSAGE(STATUS "Freetype_DIR: ${Freetype_DIR}")

Superbuild/PythonExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ IF(UNIX)
137137
IF(BUILD_HEADLESS)
138138
SET(PYTHON_MODULE_SEARCH_PATH Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
139139
ELSE()
140-
SET(PYTHON_MODULE_SEARCH_PATH ../Frameworks/Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
140+
SET(PYTHON_MODULE_SEARCH_PATH Frameworks/Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/${SCI_PYTHON_MODULE_PARENT_PATH}/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
141141
ENDIF()
142142
SET(SCI_PYTHON_FRAMEWORK_ARCHIVE ${INSTALL_DIR}/${python_FRAMEWORK_ARCHIVE})
143143
ELSE()

Superbuild/Superbuild.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ ADD_EXTERNAL( ${SUPERBUILD_DIR}/ZlibExternal.cmake Zlib_external )
144144
ADD_EXTERNAL( ${SUPERBUILD_DIR}/SQLiteExternal.cmake SQLite_external )
145145
ADD_EXTERNAL( ${SUPERBUILD_DIR}/LibPNGExternal.cmake LibPNG_external )
146146
ADD_EXTERNAL( ${SUPERBUILD_DIR}/TeemExternal.cmake Teem_external )
147+
ADD_EXTERNAL( ${SUPERBUILD_DIR}/FreetypeExternal.cmake Freetype_external )
147148

148149
IF(BUILD_WITH_PYTHON)
149150
ADD_EXTERNAL( ${SUPERBUILD_DIR}/PythonExternal.cmake Python_external )
@@ -185,6 +186,7 @@ SET(SCIRUN_CACHE_ARGS
185186
"-DBoost_DIR:PATH=${Boost_DIR}"
186187
"-DTeem_DIR:PATH=${Teem_DIR}"
187188
"-DTetgen_DIR:PATH=${Tetgen_DIR}"
189+
"-DFreetype_DIR:PATH=${Freetype_DIR}"
188190
)
189191

190192
IF(BUILD_WITH_PYTHON)

bin/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*
1+
*

src/CMake/scripts/macdeploy.sh

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# For more information, please see: http://software.sci.utah.edu
2+
#
3+
# The MIT License
4+
#
5+
# Copyright (c) 2015 Scientific Computing and Imaging Institute,
6+
# University of Utah.
7+
#
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a
10+
# copy of this software and associated documentation files (the "Software"),
11+
# to deal in the Software without restriction, including without limitation
12+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
13+
# and/or sell copies of the Software, and to permit persons to whom the
14+
# Software is furnished to do so, subject to the following conditions:
15+
#
16+
# The above copyright notice and this permission notice shall be included
17+
# in all copies or substantial portions of the Software.
18+
#
19+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25+
# DEALINGS IN THE SOFTWARE.
26+
#
27+
# macdeploy.sh: change runtime paths in app bundle libraries and executables
28+
#!/bin/bash
29+
30+
print() {
31+
if [[ $# -lt 2 ]]; then
32+
echo "$0 verbose (0 off or 1 on) string"
33+
exit -1
34+
fi
35+
local verbose=$1
36+
local string=$2
37+
if [[ $verbose -eq 1 ]]; then
38+
echo "$string"
39+
fi
40+
}
41+
42+
if [[ $# -lt 4 ]]; then
43+
echo "$0 path_to_app_bundle original_lib_dir appname verbose (0 off or 1 on)"
44+
exit -1
45+
fi
46+
47+
app_bundle=$1
48+
original_lib_dir=$2
49+
appname=$3
50+
verbose=$4
51+
52+
if [[ $verbose -ne 0 && $verbose -ne 1 ]]; then
53+
echo "Arg 5 (verbose) not set to 0 or 1. Defaulting to verbose output off."
54+
verbose=0
55+
fi
56+
57+
print $verbose "SCIRun library directory: ${original_lib_dir}"
58+
59+
cwd=`pwd`
60+
cd $app_bundle/Contents/Frameworks
61+
62+
# TODO: when CMP0042 new is supported, switch to @rpath
63+
scirun_libs=`ls -1 *.dylib`
64+
for l in ${scirun_libs}; do
65+
if [[ $verbose -eq 1 ]]; then
66+
echo "processing $l"
67+
fi
68+
COMMAND=`otool -L $l | sed -n "s:"$original_lib_dir":& :p" | awk -v lib=$l '{print "install_name_tool -change "$1$2" "$2" " lib }'`
69+
print $verbose "${COMMAND}"
70+
sh -c "${COMMAND}"
71+
72+
COMMAND=`otool -L $l | sed -n "s:[^/][^/]*lib[A-z0-9_.]*.dylib:&:p" | awk -v lib=$l '{print "install_name_tool -change "$1" @executable_path/../Frameworks/"$1" " lib }'`
73+
print $verbose "${COMMAND}"
74+
sh -c "${COMMAND}"
75+
76+
print $verbose "install_name_tool -id @executable_path/../Frameworks/${l} ${l}"
77+
install_name_tool -id "@executable_path/../Frameworks/${l}" ${l}
78+
done
79+
80+
cd $cwd
81+
cd $app_bundle/Contents/MacOS
82+
83+
COMMAND=`otool -L $appname | sed -n "s:$original_lib_dir:& :p" | awk -v lib=$appname '{print "install_name_tool -change "$1$2" "$2" " lib }'`
84+
print $verbose "${COMMAND}"
85+
sh -c "${COMMAND}"
86+
87+
COMMAND=`otool -L $appname | sed -n "s:[^/][^/]*lib[A-z0-9_.]*.dylib:&:p" | awk -v lib=$appname '{print "install_name_tool -change "$1" @executable_path/../Frameworks/"$1" " lib }'`
88+
print $verbose "${COMMAND}"
89+
sh -c "${COMMAND}"
90+
91+
cd $cwd

src/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ INCLUDE(${SQLITE_USE_FILE})
227227
CONFIG_STANDARD_EXTERNAL( Teem TeemConfig.cmake ${Teem_DIR} )
228228
INCLUDE(${Teem_USE_FILE})
229229

230+
CONFIG_STANDARD_EXTERNAL( Freetype FreetypeConfig.cmake ${Freetype_DIR} )
231+
INCLUDE(${FREETYPE_USE_FILE})
232+
230233
IF(BUILD_WITH_PYTHON)
231234
CONFIG_STANDARD_EXTERNAL( Python PythonConfig.cmake ${Python_DIR} )
232235
INCLUDE(${SCI_PYTHON_USE_FILE})
@@ -421,7 +424,7 @@ CPM_AddModule("es_general"
421424
# ++ MODULE: Entity System Rendering.
422425
CPM_AddModule("es_render"
423426
GIT_REPOSITORY "https://github.com/CIBC-Internal/cpm-es-render"
424-
GIT_TAG "origin/SCIRun"
427+
GIT_TAG "origin/AddFBO"
425428
USE_EXISTING_VER TRUE)
426429

427430
# ++ MODULE: Acorn
@@ -779,6 +782,7 @@ SET_PROPERTY(TARGET Modules_Legacy_FiniteElements PROPERTY FOLDER "Modules/Fin
779782
SET_PROPERTY(TARGET Modules_Legacy_Fields PROPERTY FOLDER "Modules/Fields")
780783
SET_PROPERTY(TARGET Modules_Legacy_Converters PROPERTY FOLDER "Modules/Basic")
781784
SET_PROPERTY(TARGET Modules_Legacy_Forward PROPERTY FOLDER "Modules/Forward")
785+
SET_PROPERTY(TARGET Modules_Legacy_String PROPERTY FOLDER "Modules/String")
782786
SET_PROPERTY(TARGET Modules_Legacy_Inverse PROPERTY FOLDER "Modules/Inverse")
783787
SET_PROPERTY(TARGET Modules_Legacy_Matlab_DataIO PROPERTY FOLDER "Modules/DataIO")
784788
SET_PROPERTY(TARGET Modules_Legacy_MatlabInterface PROPERTY FOLDER "Modules/Matlab")
@@ -859,6 +863,7 @@ IF(BUILD_TESTING)
859863
IF(BUILD_WITH_PYTHON)
860864
SET_PROPERTY(TARGET Core_Python_Tests PROPERTY FOLDER "Core/Tests")
861865
SET_PROPERTY(TARGET Engine_Python_Tests PROPERTY FOLDER "Dataflow/Engine/Tests")
866+
SET_PROPERTY(TARGET Modules_Python_Tests PROPERTY FOLDER "Modules/Python")
862867
ENDIF()
863868
ENDIF()
864869

@@ -870,6 +875,8 @@ SET_PROPERTY(TARGET xml2 PROPERTY FOLDER "Externals")
870875
IF(BUILD_WITH_PYTHON)
871876
SET_PROPERTY(TARGET Core_Python PROPERTY FOLDER "Core")
872877
SET_PROPERTY(TARGET SCIRunPythonAPI PROPERTY FOLDER "Dataflow/Engine")
878+
SET_PROPERTY(TARGET Modules_Python PROPERTY FOLDER "Modules/Python")
879+
SET_PROPERTY(TARGET Interface_Modules_Python PROPERTY FOLDER "Interface/Modules")
873880
ENDIF()
874881

875882
########################################################################

src/Core/Algorithms/Base/AlgorithmBase.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ 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+
137144
std::string AlgorithmParameter::toString() const
138145
{
139146
const std::string* v = boost::get<std::string>(&value_);

src/Core/Algorithms/Base/AlgorithmMacros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace SCIRun {
3939
template <typename T>
4040
boost::shared_ptr<T> optionalAlgoInput(boost::optional<boost::shared_ptr<T>> opt)
4141
{
42-
return opt.get_value_or(boost::shared_ptr<T>());
42+
return opt.get_value_or(nullptr);
4343
}
4444

4545
}}}

src/Core/Algorithms/Base/AlgorithmVariableNames.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ INPUT(ListOfInputFields)
6262
INPUT(InputFields)
6363
INPUT(Source)
6464
INPUT(Destination)
65+
INPUT(InputNrrd)
6566

6667
OUTPUT(MatrixInfo)
6768
OUTPUT(Result)
@@ -70,4 +71,5 @@ OUTPUT(MatrixLoaded)
7071
OUTPUT(Solution)
7172
OUTPUT(OutputField)
7273
OUTPUT(OutputMatrix)
74+
OUTPUT(OutputNrrd)
7375
OUTPUT(ListOfOutputFields)

src/Core/Algorithms/Base/AlgorithmVariableNames.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class SCISHARE Variables
6767
static const AlgorithmInputName InputFields;
6868
static const AlgorithmInputName Source;
6969
static const AlgorithmInputName Destination;
70+
static const AlgorithmInputName InputNrrd;
7071

7172
static const AlgorithmOutputName MatrixInfo;
7273
static const AlgorithmOutputName Result;
@@ -75,6 +76,7 @@ class SCISHARE Variables
7576
static const AlgorithmOutputName Solution;
7677
static const AlgorithmOutputName OutputField;
7778
static const AlgorithmOutputName OutputMatrix;
79+
static const AlgorithmOutputName OutputNrrd;
7880
static const AlgorithmOutputName ListOfOutputFields;
7981
};
8082

0 commit comments

Comments
 (0)