Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
afe0e423
Commit
afe0e423
authored
Dec 05, 2018
by
Antoine Regimbeau
Browse files
ENH: add documentation and xarning error
parent
15937a0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Packaging/CMakeLists.txt
View file @
afe0e423
...
...
@@ -210,7 +210,9 @@ prepare_search_dirs(PKG_SEARCHDIRS)
set
(
PKG_PEFILES
)
prepare_file_list
(
PKG_PEFILES
)
include
(
prepare_openmp
)
if
(
APPLE OR UNIX
)
include
(
prepare_openmp
)
endif
()
foreach
(
pfile
${
PKG_PEFILES
}
)
process_file_recurse
(
${
pfile
}
)
...
...
Packaging/prepare_openmp.cmake
View file @
afe0e423
...
...
@@ -17,6 +17,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
#This cmake file is here to allow packaging of openMP.
#Windows case is not taking care of as we already provide search dir for
#the omp dll
#function to get symlink target works
function
(
get_symlink_target target symlink
)
execute_process
(
COMMAND
"
${
READLINK
}
"
-f
"
${
symlink
}
"
RESULT_VARIABLE readlink_rv
...
...
@@ -27,6 +33,7 @@ function(get_symlink_target target symlink)
set
(
${
target
}
"
${
readlink_ov
}
"
PARENT_SCOPE
)
endfunction
(
get_symlink_target
)
#This function strip the result of ${LOADER_PROGRAM} to retrieve proper lib name
function
(
strip_candidate refine_candidate raw_candidate
)
set
(
${
refine_candidate
}
""
PARENT_SCOPE
)
if
(
NOT raw_candidate
)
...
...
@@ -74,8 +81,8 @@ set(OMP_NAME_LIST
#OpenMP workaround for unix and mac system
#We create a temporary directory where we are going to copy all omp library
#found in ${OMP_LIB_DIR}
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/omp-lib
)
set
(
OMP_TEMP_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/omp-lib
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/
tmp-
omp-lib
)
set
(
OMP_TEMP_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/
tmp-
omp-lib
)
set
(
otbcommon_glob_name
"
${
SUPERBUILD_INSTALL_DIR
}
/lib/
${
LIB_PREFIX
}
OTBCommon-*
${
LIB_EXT
}
"
)
...
...
@@ -84,7 +91,10 @@ file(GLOB otbcommon_paths ${otbcommon_glob_name})
#file(GLOB..) might find several lib matching
#We are taking the first one.
list
(
GET otbcommon_paths 0 otbcommon_path
)
if
(
NOT EXISTS
"
${
otbcommon_path
}
"
)
message
(
FATAL_ERROR
"Error, cannot find
${
LIB_PREFIX
}
OTBCommon-* in :
${
SUPERBUILD_INSTALL_DIR
}
/lib/, result is :
${
otbcommon_path
}
"
)
endif
()
#We are getting all the dependancies of the lib. If openMP has been used
#for compiling OTB we will find it here.
execute_process
(
...
...
@@ -119,7 +129,8 @@ foreach(omp_candidate ${omp_candidates})
#we should find the lib in th OMP_LIB_DIR
set
(
omp_full_path
${
OMP_LIB_DIR
}
/
${
omp_lib
}
)
if
(
NOT EXISTS
${
omp_full_path
}
)
message
(
FATAL_ERROR
"Warning openMP not found in :
${
OMP_LIB_DIR
}
"
)
message
(
FATAL_ERROR
"Warning openMP lib :
${
omp_lib
}
not found in :
${
OMP_LIB_DIR
}
"
)
endif
()
#We need to loop over symlink
...
...
Packaging/prepare_search_dirs.cmake
View file @
afe0e423
...
...
@@ -35,6 +35,7 @@ function(prepare_search_dirs search_dirs_result)
list
(
APPEND search_dirs
"
${
UCRT_SDK_DIR
}
/Redist/ucrt/DLLs/
${
OTB_TARGET_SYSTEM_ARCH
}
"
)
#ucrt dlls
#additional msvc redist dll from VCINSTALLDIR
# openmp for unix and apple is done in a different file : prepare_openmp.cmake
file
(
TO_CMAKE_PATH
"$ENV{VCINSTALLDIR}"
PKG_VCINSTALLDIR
)
list
(
APPEND search_dirs
"
${
PKG_VCINSTALLDIR
}
/redist/
${
OTB_TARGET_SYSTEM_ARCH
}
/Microsoft.VC140.CRT"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment