forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request InsightSoftwareConsortium#5175 from bradking/impor…
…t-liblbfgs ENH: Import libLBFGS from upstream
- Loading branch information
Showing
13 changed files
with
113 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
shopt -s dotglob | ||
|
||
readonly name="libLBFGS" | ||
readonly ownership="libLBFGS Upstream <[email protected]>" | ||
readonly subtree="Modules/ThirdParty/libLBFGS/src/itklbfgs" | ||
readonly repo="https://github.com/chokkan/liblbfgs.git" | ||
readonly tag="v1.10" | ||
readonly paths=" | ||
COPYING | ||
include/*.h | ||
lib/*.c | ||
lib/*.h | ||
" | ||
|
||
extract_source () { | ||
git_archive | ||
pushd "${extractdir}/${name}-reduced" | ||
echo "* -whitespace" >> .gitattributes | ||
popd | ||
} | ||
|
||
. "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/update-third-party.bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
ADD_LIBRARY( itklbfgs | ||
lbfgs.c | ||
) | ||
|
||
IF(ITK_LIBRARY_PROPERTIES) | ||
SET_TARGET_PROPERTIES(itklbfgs PROPERTIES ${ITK_LIBRARY_PROPERTIES}) | ||
ENDIF(ITK_LIBRARY_PROPERTIES) | ||
|
||
set(ITK3P_INSTALL_EXPORT_NAME "${ITKLIBLBFGS-targets}") | ||
set(ITK3P_INSTALL_INCLUDE_DIR "${ITKLIBLBFGS_INSTALL_INCLUDE_DIR}") | ||
set(ITK3P_INSTALL_RUNTIME_DIR "${ITKLIBLBFGS_INSTALL_RUNTIME_DIR}") | ||
set(ITK3P_INSTALL_LIBRARY_DIR "${ITKLIBLBFGS_INSTALL_LIBRARY_DIR}") | ||
set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKLIBLBFGS_INSTALL_ARCHIVE_DIR}") | ||
|
||
IF(UNIX) | ||
TARGET_LINK_LIBRARIES(itklbfgs m) | ||
ENDIF(UNIX) | ||
|
||
INSTALL(TARGETS itklbfgs | ||
EXPORT ${ITK3P_INSTALL_EXPORT_NAME} | ||
RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries | ||
LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries | ||
ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development) | ||
|
||
add_subdirectory(itklbfgs) | ||
itk_module_target(itklbfgs NO_INSTALL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright NumFOCUS | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
/*========================================================================= | ||
* Include file to wrap the internal ITK libLBFGS library header | ||
*=========================================================================*/ | ||
|
||
#ifndef itk_lbfgs_h | ||
#define itk_lbfgs_h | ||
|
||
#include <itklbfgs/include/lbfgs.h> | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* -whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
add_library(itklbfgs lib/lbfgs.c) | ||
target_include_directories(itklbfgs PRIVATE include) | ||
|
||
if(ITK_LIBRARY_PROPERTIES) | ||
set_target_properties(itklbfgs PROPERTIES ${ITK_LIBRARY_PROPERTIES}) | ||
endif() | ||
|
||
if(UNIX) | ||
target_link_libraries(itklbfgs m) | ||
endif() | ||
|
||
install(TARGETS itklbfgs | ||
EXPORT ${ITK3P_INSTALL_EXPORT_NAME} | ||
RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries | ||
LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries | ||
ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development) | ||
|
||
install(FILES | ||
${CMAKE_CURRENT_SOURCE_DIR}/include/lbfgs.h | ||
DESTINATION ${ITK3P_INSTALL_INCLUDE_DIR}/itklbfgs/include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License | ||
|
||
Copyright (c) 1990 Jorge Nocedal | ||
Copyright (c) 2007-2010 Naoaki Okazaki | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters