Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
9c6917e9
Commit
9c6917e9
authored
8 years ago
by
Luc Hermitte
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Fix multiple Boost lib dependency
parent
2abdeea4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Modules/ThirdParty/Boost/otb-module-init.cmake
+12
-7
12 additions, 7 deletions
Modules/ThirdParty/Boost/otb-module-init.cmake
SuperBuild/CMake/External_boost.cmake
+26
-16
26 additions, 16 deletions
SuperBuild/CMake/External_boost.cmake
with
38 additions
and
23 deletions
Modules/ThirdParty/Boost/otb-module-init.cmake
+
12
−
7
View file @
9c6917e9
# Required
message
(
STATUS
"Looking for required Boost headers"
)
find_package
(
Boost
1.35.0
1.35.0
REQUIRED
)
# Mandatory components
# - date_time -> ossim plugins
set
(
OTB_Boost_MANDATORY_COMPONENTS date_time
)
# Optional components
# Boost (OPTIONAL_COMPONENTS does not work with Boost find_package)
# unit_test_framework component is used only in GdalAdapters module
if
(
BUILD_TESTING
)
set
(
OTB_Boost_OPTIONAL_COMPONENTS unit_test_framework
)
message
(
STATUS
"Looking for optional Boost components :
${
OTB_Boost_OPTIONAL_COMPONENTS
}
"
)
find_package
(
Boost
QUIET
1.35.0
COMPONENTS
${
OTB_Boost_OPTIONAL_COMPONENTS
}
)
endif
()
#Quiet find package to avoid message "Could not find boost" because unit_testing_framework is not installed
message
(
STATUS
"Looking for optional Boost components :
${
OTB_Boost_OPTIONAL_COMPONENTS
}
"
)
find_package
(
Boost
QUIET
1.35.0
COMPONENTS
${
OTB_Boost_MANDATORY_COMPONENTS
}
${
OTB_Boost_OPTIONAL_COMPONENTS
}
)
This diff is collapsed.
Click to expand it.
SuperBuild/CMake/External_boost.cmake
+
26
−
16
View file @
9c6917e9
...
...
@@ -8,15 +8,25 @@ if(NOT __EXTERNAL_BOOST__)
set
(
__EXTERNAL_BOOST__ 1
)
if
(
USE_SYSTEM_BOOST
)
# Required
find_package
(
Boost
1.35.0
)
# Optional components
find_package
(
Boost
1.35.0
COMPONENTS unit_test_framework date_time
)
message
(
STATUS
" Using Boost system version"
)
else
()
SETUP_SUPERBUILD
(
PROJECT BOOST
)
message
(
STATUS
" Using Boost superbuild version"
)
option
(
SUPERBUILD_BOOST_HEADER_ONLY
"Only use Boost headers"
ON
)
mark_as_advanced
(
SUPERBUILD_BOOST_HEADER_ONLY
)
if
(
UNIX
)
if
(
SUPERBUILD_BOOST_HEADER_ONLY
)
ExternalProject_Add
(
BOOST
...
...
@@ -30,8 +40,8 @@ else()
-DCMAKE_INSTALL_PREFIX:STRING=
${
SB_INSTALL_PREFIX
}
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
PATCH_COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_SOURCE_DIR
}
/patches/BOOST/CMakeLists.txt
PATCH_COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_SOURCE_DIR
}
/patches/BOOST/CMakeLists.txt
${
BOOST_SB_SRC
}
)
else
()
...
...
@@ -52,7 +62,7 @@ else()
${
CMAKE_SOURCE_DIR
}
/patches/BOOST/1.54.0
${
BOOST_SB_SRC
}
)
ExternalProject_Add_Step
(
BOOST copy_source
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
BOOST_SB_SRC
}
${
BOOST_SB_BUILD_DIR
}
...
...
@@ -60,25 +70,25 @@ else()
DEPENDERS configure
)
endif
()
message
(
STATUS
" Using Boost SuperBuild version"
)
else
(
MSVC
)
#TODO: find hash for archives properly
set
(
BOOST_HEADERS_URL_HASH 1605dc6085cb2dc778ef5ab6c0e59083
)
set
(
BOOST_GRAPH_URL_HASH c246516ca84a3c79ae8a0b22fceb0344
)
set
(
BOOST_REGEX_URL_HASH a3bfc2dc9a3ebe3c050518ecb29d6f8b
)
set
(
BOOST_UTF_URL_HASH 75971963a74c76d32e01974a8e48be11
)
if
(
MSVC10
)
set
(
BOOST_HEADERS_URL_HASH 1605dc6085cb2dc778ef5ab6c0e59083
)
set
(
BOOST_GRAPH_URL_HASH c246516ca84a3c79ae8a0b22fceb0344
)
set
(
BOOST_REGEX_URL_HASH a3bfc2dc9a3ebe3c050518ecb29d6f8b
)
set
(
BOOST_UTF_URL_HASH 75971963a74c76d32e01974a8e48be11
)
else
(
MSVC80
)
else
(
CMAKE_COMPILER_2005
)
endif
()
set
(
BOOST_HEADERS_URL
"http://sourceforge.net/projects/boost/files/boost-binaries/1.50.0/boost_1_50_headers.zip/download"
)
...
...
@@ -100,7 +110,7 @@ else()
ExternalProject_Add
(
BOOST_
${
BOOSTLIB
}
PREFIX BOOST/_
${
BOOSTLIB
}
URL
${
BOOST_
${
BOOSTLIB
}
_URL
}
URL_MD5
${
BOOST_
${
BOOSTLIB
}
_URL_HASH
}
URL_MD5
${
BOOST_
${
BOOSTLIB
}
_URL_HASH
}
SOURCE_DIR
${
BOOST_SB_SRC
}
/lib
DEPENDS BOOST_HEADERS
CONFIGURE_COMMAND
""
...
...
@@ -109,7 +119,7 @@ else()
)
list
(
APPEND BOOSTLIBS BOOST_
${
BOOSTLIB
}
)
endforeach
()
ExternalProject_Add
(
BOOST
PREFIX BOOST
DOWNLOAD_COMMAND
""
...
...
@@ -121,12 +131,12 @@ else()
)
message
(
STATUS
" Using Boost SuperBuild version (prebuilt binaries)"
)
endif
()
#end else MSVC
set
(
_SB_Boost_INCLUDE_DIR
${
SB_INSTALL_PREFIX
}
/include
)
set
(
_SB_Boost_LIBRARY_DIR
${
SB_INSTALL_PREFIX
}
/lib
)
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment