Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
e26e09d3
Commit
e26e09d3
authored
Mar 10, 2018
by
Davis King
Browse files
Fixed tabbing and formatting
parent
2b9de7f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
199 additions
and
199 deletions
+199
-199
dlib/cmake_utils/check_if_neon_available.cmake
dlib/cmake_utils/check_if_neon_available.cmake
+3
-3
dlib/cmake_utils/find_blas.cmake
dlib/cmake_utils/find_blas.cmake
+185
-185
dlib/cmake_utils/set_compiler_specific_options.cmake
dlib/cmake_utils/set_compiler_specific_options.cmake
+1
-1
dlib/cmake_utils/tell_visual_studio_to_use_static_runtime.cmake
...make_utils/tell_visual_studio_to_use_static_runtime.cmake
+1
-1
dlib/cmake_utils/use_cpp_11.cmake
dlib/cmake_utils/use_cpp_11.cmake
+9
-9
No files found.
dlib/cmake_utils/check_if_neon_available.cmake
View file @
e26e09d3
...
@@ -12,9 +12,9 @@ set(ARM_NEON_IS_AVAILABLE 0)
...
@@ -12,9 +12,9 @@ set(ARM_NEON_IS_AVAILABLE 0)
# test if __ARM_NEON__ is defined
# test if __ARM_NEON__ is defined
try_compile
(
test_for_neon_worked
${
PROJECT_BINARY_DIR
}
/neon_test_build
${
CMAKE_CURRENT_LIST_DIR
}
/test_for_neon
try_compile
(
test_for_neon_worked
${
PROJECT_BINARY_DIR
}
/neon_test_build
${
CMAKE_CURRENT_LIST_DIR
}
/test_for_neon
neon_test
)
neon_test
)
if
(
test_for_neon_worked
)
if
(
test_for_neon_worked
)
message
(
STATUS
"__ARM_NEON__ defined."
)
message
(
STATUS
"__ARM_NEON__ defined."
)
set
(
ARM_NEON_IS_AVAILABLE 1
)
set
(
ARM_NEON_IS_AVAILABLE 1
)
endif
()
endif
()
dlib/cmake_utils/find_blas.cmake
View file @
e26e09d3
...
@@ -32,128 +32,128 @@ SET(lapack_without_underscore 0)
...
@@ -32,128 +32,128 @@ SET(lapack_without_underscore 0)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
if
(
UNIX OR MINGW
)
if
(
UNIX OR MINGW
)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
if
(
BUILDING_MATLAB_MEX_FILE
)
if
(
BUILDING_MATLAB_MEX_FILE
)
find_library
(
MATLAB_BLAS_LIBRARY mwblas PATHS
${
MATLAB_LIB_FOLDERS
}
)
find_library
(
MATLAB_BLAS_LIBRARY mwblas PATHS
${
MATLAB_LIB_FOLDERS
}
)
find_library
(
MATLAB_LAPACK_LIBRARY mwlapack PATHS
${
MATLAB_LIB_FOLDERS
}
)
find_library
(
MATLAB_LAPACK_LIBRARY mwlapack PATHS
${
MATLAB_LIB_FOLDERS
}
)
if
(
MATLAB_BLAS_LIBRARY AND MATLAB_LAPACK_LIBRARY
)
if
(
MATLAB_BLAS_LIBRARY AND MATLAB_LAPACK_LIBRARY
)
add_subdirectory
(
external/cblas
)
add_subdirectory
(
external/cblas
)
set
(
blas_libraries
${
MATLAB_BLAS_LIBRARY
}
cblas
)
set
(
blas_libraries
${
MATLAB_BLAS_LIBRARY
}
cblas
)
set
(
lapack_libraries
${
MATLAB_LAPACK_LIBRARY
}
)
set
(
lapack_libraries
${
MATLAB_LAPACK_LIBRARY
}
)
set
(
blas_found 1
)
set
(
blas_found 1
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
message
(
STATUS
"Found MATLAB's BLAS and LAPACK libraries"
)
message
(
STATUS
"Found MATLAB's BLAS and LAPACK libraries"
)
endif
()
endif
()
# Don't try to link to anything other than MATLAB's own internal blas
# Don't try to link to anything other than MATLAB's own internal blas
# and lapack libraries because doing so generally upsets MATLAB. So
# and lapack libraries because doing so generally upsets MATLAB. So
# we just end here no matter what.
# we just end here no matter what.
return
()
return
()
endif
()
endif
()
# First, search for libraries via pkg-config, which is the cleanest path
# First, search for libraries via pkg-config, which is the cleanest path
find_package
(
PkgConfig
)
find_package
(
PkgConfig
)
pkg_check_modules
(
BLAS_REFERENCE cblas
)
pkg_check_modules
(
BLAS_REFERENCE cblas
)
pkg_check_modules
(
LAPACK_REFERENCE lapack
)
pkg_check_modules
(
LAPACK_REFERENCE lapack
)
if
(
BLAS_REFERENCE_FOUND AND LAPACK_REFERENCE_FOUND
)
if
(
BLAS_REFERENCE_FOUND AND LAPACK_REFERENCE_FOUND
)
set
(
blas_libraries
"
${
BLAS_REFERENCE_LDFLAGS
}
"
)
set
(
blas_libraries
"
${
BLAS_REFERENCE_LDFLAGS
}
"
)
set
(
lapack_libraries
"
${
LAPACK_REFERENCE_LDFLAGS
}
"
)
set
(
lapack_libraries
"
${
LAPACK_REFERENCE_LDFLAGS
}
"
)
set
(
blas_found 1
)
set
(
blas_found 1
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
set
(
REQUIRES_LIBS
"
${
REQUIRES_LIBS
}
cblas lapack"
)
set
(
REQUIRES_LIBS
"
${
REQUIRES_LIBS
}
cblas lapack"
)
message
(
STATUS
"Found BLAS and LAPACK via pkg-config"
)
message
(
STATUS
"Found BLAS and LAPACK via pkg-config"
)
return
()
return
()
endif
()
endif
()
include
(
CheckTypeSize
)
include
(
CheckTypeSize
)
check_type_size
(
"void*"
SIZE_OF_VOID_PTR
)
check_type_size
(
"void*"
SIZE_OF_VOID_PTR
)
if
(
SIZE_OF_VOID_PTR EQUAL 8
)
if
(
SIZE_OF_VOID_PTR EQUAL 8
)
set
(
mkl_search_path
set
(
mkl_search_path
/opt/intel/mkl/*/lib/em64t
/opt/intel/mkl/*/lib/em64t
/opt/intel/mkl/lib/intel64
/opt/intel/mkl/lib/intel64
/opt/intel/lib/intel64
/opt/intel/lib/intel64
/opt/intel/mkl/lib
/opt/intel/mkl/lib
)
)
find_library
(
mkl_intel mkl_intel_lp64
${
mkl_search_path
}
)
find_library
(
mkl_intel mkl_intel_lp64
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_intel
)
mark_as_advanced
(
mkl_intel
)
else
()
else
()
set
(
mkl_search_path
set
(
mkl_search_path
/opt/intel/mkl/*/lib/32
/opt/intel/mkl/*/lib/32
/opt/intel/mkl/lib/ia32
/opt/intel/mkl/lib/ia32
/opt/intel/lib/ia32
/opt/intel/lib/ia32
)
)
find_library
(
mkl_intel mkl_intel
${
mkl_search_path
}
)
find_library
(
mkl_intel mkl_intel
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_intel
)
mark_as_advanced
(
mkl_intel
)
endif
()
endif
()
include
(
CheckLibraryExists
)
include
(
CheckLibraryExists
)
# Get mkl_include_dir
# Get mkl_include_dir
set
(
mkl_include_search_path
set
(
mkl_include_search_path
/opt/intel/mkl/include
/opt/intel/mkl/include
/opt/intel/include
/opt/intel/include
)
)
find_path
(
mkl_include_dir mkl_version.h
${
mkl_include_search_path
}
)
find_path
(
mkl_include_dir mkl_version.h
${
mkl_include_search_path
}
)
mark_as_advanced
(
mkl_include_dir
)
mark_as_advanced
(
mkl_include_dir
)
# Search for the needed libraries from the MKL. We will try to link against the mkl_rt
# Search for the needed libraries from the MKL. We will try to link against the mkl_rt
# file first since this way avoids linking bugs in some cases.
# file first since this way avoids linking bugs in some cases.
find_library
(
mkl_rt mkl_rt
${
mkl_search_path
}
)
find_library
(
mkl_rt mkl_rt
${
mkl_search_path
}
)
find_library
(
openmp_libraries iomp5
${
mkl_search_path
}
)
find_library
(
openmp_libraries iomp5
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_rt openmp_libraries
)
mark_as_advanced
(
mkl_rt openmp_libraries
)
# if we found the MKL
# if we found the MKL
if
(
mkl_rt
)
if
(
mkl_rt
)
set
(
mkl_libraries
${
mkl_rt
}
)
set
(
mkl_libraries
${
mkl_rt
}
)
set
(
blas_libraries
${
mkl_rt
}
)
set
(
blas_libraries
${
mkl_rt
}
)
set
(
lapack_libraries
${
mkl_rt
}
)
set
(
lapack_libraries
${
mkl_rt
}
)
set
(
blas_found 1
)
set
(
blas_found 1
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
set
(
found_intel_mkl 1
)
set
(
found_intel_mkl 1
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
endif
()
endif
()
if
(
NOT found_intel_mkl
)
if
(
NOT found_intel_mkl
)
# Search for the needed libraries from the MKL. This time try looking for a different
# Search for the needed libraries from the MKL. This time try looking for a different
# set of MKL files and try to link against those.
# set of MKL files and try to link against those.
find_library
(
mkl_core mkl_core
${
mkl_search_path
}
)
find_library
(
mkl_core mkl_core
${
mkl_search_path
}
)
find_library
(
mkl_thread mkl_intel_thread
${
mkl_search_path
}
)
find_library
(
mkl_thread mkl_intel_thread
${
mkl_search_path
}
)
find_library
(
mkl_iomp iomp5
${
mkl_search_path
}
)
find_library
(
mkl_iomp iomp5
${
mkl_search_path
}
)
find_library
(
mkl_pthread pthread
${
mkl_search_path
}
)
find_library
(
mkl_pthread pthread
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_intel mkl_core mkl_thread mkl_iomp mkl_pthread
)
mark_as_advanced
(
mkl_intel mkl_core mkl_thread mkl_iomp mkl_pthread
)
# If we found the MKL
# If we found the MKL
if
(
mkl_intel AND mkl_core AND mkl_thread AND mkl_iomp AND mkl_pthread
)
if
(
mkl_intel AND mkl_core AND mkl_thread AND mkl_iomp AND mkl_pthread
)
set
(
mkl_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
mkl_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
blas_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
blas_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
lapack_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
lapack_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
${
mkl_pthread
}
)
set
(
blas_found 1
)
set
(
blas_found 1
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
set
(
found_intel_mkl 1
)
set
(
found_intel_mkl 1
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
endif
()
endif
()
endif
()
endif
()
if
(
found_intel_mkl AND mkl_include_dir
)
if
(
found_intel_mkl AND mkl_include_dir
)
set
(
found_intel_mkl_headers 1
)
set
(
found_intel_mkl_headers 1
)
endif
()
endif
()
# try to find some other LAPACK libraries if we didn't find the MKL
# try to find some other LAPACK libraries if we didn't find the MKL
set
(
extra_paths
set
(
extra_paths
/usr/lib64
/usr/lib64
/usr/lib64/atlas-sse3
/usr/lib64/atlas-sse3
/usr/lib64/atlas-sse2
/usr/lib64/atlas-sse2
/usr/lib64/atlas
/usr/lib64/atlas
/usr/lib
/usr/lib
/usr/lib/atlas-sse3
/usr/lib/atlas-sse3
/usr/lib/atlas-sse2
/usr/lib/atlas-sse2
/usr/lib/atlas
/usr/lib/atlas
/usr/lib/openblas-base
/usr/lib/openblas-base
/opt/OpenBLAS/lib
/opt/OpenBLAS/lib
$ENV{OPENBLAS_HOME}/lib
$ENV{OPENBLAS_HOME}/lib
)
)
INCLUDE
(
CheckFunctionExists
)
INCLUDE
(
CheckFunctionExists
)
...
@@ -188,9 +188,9 @@ if (UNIX OR MINGW)
...
@@ -188,9 +188,9 @@ if (UNIX OR MINGW)
mark_as_advanced
(
lapack_lib
)
mark_as_advanced
(
lapack_lib
)
endif
()
endif
()
# try to find some other BLAS libraries if we didn't find the MKL
# try to find some other BLAS libraries if we didn't find the MKL
if
(
NOT blas_found
)
if
(
NOT blas_found
)
find_library
(
atlas_lib atlas PATHS
${
extra_paths
}
)
find_library
(
atlas_lib atlas PATHS
${
extra_paths
}
)
find_library
(
cblas_lib cblas PATHS
${
extra_paths
}
)
find_library
(
cblas_lib cblas PATHS
${
extra_paths
}
)
...
@@ -225,7 +225,7 @@ if (UNIX OR MINGW)
...
@@ -225,7 +225,7 @@ if (UNIX OR MINGW)
mark_as_advanced
(
cblas_lib
)
mark_as_advanced
(
cblas_lib
)
endif
()
endif
()
if
(
NOT blas_found
)
if
(
NOT blas_found
)
find_library
(
generic_blas blas PATHS
${
extra_paths
}
)
find_library
(
generic_blas blas PATHS
${
extra_paths
}
)
if
(
generic_blas
)
if
(
generic_blas
)
...
@@ -257,64 +257,64 @@ if (UNIX OR MINGW)
...
@@ -257,64 +257,64 @@ if (UNIX OR MINGW)
elseif
(
WIN32 AND NOT MINGW
)
elseif
(
WIN32 AND NOT MINGW
)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
message
(
STATUS
"Searching for BLAS and LAPACK"
)
include
(
CheckTypeSize
)
include
(
CheckTypeSize
)
check_type_size
(
"void*"
SIZE_OF_VOID_PTR
)
check_type_size
(
"void*"
SIZE_OF_VOID_PTR
)
if
(
SIZE_OF_VOID_PTR EQUAL 8
)
if
(
SIZE_OF_VOID_PTR EQUAL 8
)
set
(
mkl_search_path
set
(
mkl_search_path
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/mkl/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/mkl/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/compiler/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/compiler/lib/intel64"
"C:/Program Files/Intel/Composer XE/mkl/lib/intel64"
"C:/Program Files/Intel/Composer XE/mkl/lib/intel64"
"C:/Program Files/Intel/Composer XE/compiler/lib/intel64"
"C:/Program Files/Intel/Composer XE/compiler/lib/intel64"
)
)
find_library
(
mkl_intel mkl_intel_lp64
${
mkl_search_path
}
)
find_library
(
mkl_intel mkl_intel_lp64
${
mkl_search_path
}
)
else
()
else
()
set
(
mkl_search_path
set
(
mkl_search_path
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/mkl/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/mkl/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/compiler/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/compiler/lib/ia32"
"C:/Program Files/Intel/Composer XE/mkl/lib/ia32"
"C:/Program Files/Intel/Composer XE/mkl/lib/ia32"
"C:/Program Files/Intel/Composer XE/compiler/lib/ia32"
"C:/Program Files/Intel/Composer XE/compiler/lib/ia32"
)
)
find_library
(
mkl_intel mkl_intel_c
${
mkl_search_path
}
)
find_library
(
mkl_intel mkl_intel_c
${
mkl_search_path
}
)
endif
()
endif
()
INCLUDE
(
CheckFunctionExists
)
INCLUDE
(
CheckFunctionExists
)
# Search for the needed libraries from the MKL.
# Search for the needed libraries from the MKL.
find_library
(
mkl_core mkl_core
${
mkl_search_path
}
)
find_library
(
mkl_core mkl_core
${
mkl_search_path
}
)
find_library
(
mkl_thread mkl_intel_thread
${
mkl_search_path
}
)
find_library
(
mkl_thread mkl_intel_thread
${
mkl_search_path
}
)
find_library
(
mkl_iomp libiomp5md
${
mkl_search_path
}
)
find_library
(
mkl_iomp libiomp5md
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_intel mkl_core mkl_thread mkl_iomp
)
mark_as_advanced
(
mkl_intel mkl_core mkl_thread mkl_iomp
)
# If we found the MKL
# If we found the MKL
if
(
mkl_intel AND mkl_core AND mkl_thread AND mkl_iomp
)
if
(
mkl_intel AND mkl_core AND mkl_thread AND mkl_iomp
)
set
(
blas_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
)
set
(
blas_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
)
set
(
lapack_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
)
set
(
lapack_libraries
${
mkl_intel
}
${
mkl_core
}
${
mkl_thread
}
${
mkl_iomp
}
)
set
(
blas_found 1
)
set
(
blas_found 1
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
message
(
STATUS
"Found Intel MKL BLAS/LAPACK library"
)
# Make sure the version of the Intel MKL we found is compatible with
# Make sure the version of the Intel MKL we found is compatible with
# the compiler we are using. One way to do this check is to see if we can
# the compiler we are using. One way to do this check is to see if we can
# link to it right now.
# link to it right now.
set
(
CMAKE_REQUIRED_LIBRARIES
${
blas_libraries
}
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
blas_libraries
}
)
CHECK_FUNCTION_EXISTS
(
cblas_ddot HAVE_CBLAS
)
CHECK_FUNCTION_EXISTS
(
cblas_ddot HAVE_CBLAS
)
if
(
NOT HAVE_CBLAS
)
if
(
NOT HAVE_CBLAS
)
message
(
"BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK"
)
message
(
"BLAS library does not have cblas symbols, so dlib will not use BLAS or LAPACK"
)
set
(
blas_found 0
)
set
(
blas_found 0
)
set
(
lapack_found 0
)
set
(
lapack_found 0
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
...
@@ -322,18 +322,18 @@ endif()
...
@@ -322,18 +322,18 @@ endif()
# When all else fails use CMake's built in functions to find BLAS and LAPACK
# When all else fails use CMake's built in functions to find BLAS and LAPACK
if
(
NOT blas_found
)
if
(
NOT blas_found
)
find_package
(
BLAS QUIET
)
find_package
(
BLAS QUIET
)
if
(
${
BLAS_FOUND
}
)
if
(
${
BLAS_FOUND
}
)
set
(
blas_libraries
${
BLAS_LIBRARIES
}
)
set
(
blas_libraries
${
BLAS_LIBRARIES
}
)
set
(
blas_found 1
)
set
(
blas_found 1
)
if
(
NOT lapack_found
)
if
(
NOT lapack_found
)
find_package
(
LAPACK QUIET
)
find_package
(
LAPACK QUIET
)
if
(
${
LAPACK_FOUND
}
)
if
(
${
LAPACK_FOUND
}
)
set
(
lapack_libraries
${
LAPACK_LIBRARIES
}
)
set
(
lapack_libraries
${
LAPACK_LIBRARIES
}
)
set
(
lapack_found 1
)
set
(
lapack_found 1
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
...
...
dlib/cmake_utils/set_compiler_specific_options.cmake
View file @
e26e09d3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
cmake_minimum_required
(
VERSION 2.8.12
)
cmake_minimum_required
(
VERSION 2.8.12
)
if
(
POLICY CMP0054
)
if
(
POLICY CMP0054
)
cmake_policy
(
SET CMP0054 NEW
)
cmake_policy
(
SET CMP0054 NEW
)
endif
()
endif
()
set
(
USING_OLD_VISUAL_STUDIO_COMPILER 0
)
set
(
USING_OLD_VISUAL_STUDIO_COMPILER 0
)
...
...
dlib/cmake_utils/tell_visual_studio_to_use_static_runtime.cmake
View file @
e26e09d3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
cmake_minimum_required
(
VERSION 2.8.12
)
cmake_minimum_required
(
VERSION 2.8.12
)
if
(
POLICY CMP0054
)
if
(
POLICY CMP0054
)
cmake_policy
(
SET CMP0054 NEW
)
cmake_policy
(
SET CMP0054 NEW
)
endif
()
endif
()
if
(
MSVC OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"MSVC"
)
if
(
MSVC OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"MSVC"
)
...
...
dlib/cmake_utils/use_cpp_11.cmake
View file @
e26e09d3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
cmake_minimum_required
(
VERSION 2.8.12
)
cmake_minimum_required
(
VERSION 2.8.12
)
if
(
POLICY CMP0054
)
if
(
POLICY CMP0054
)
cmake_policy
(
SET CMP0054 NEW
)
cmake_policy
(
SET CMP0054 NEW
)
endif
()
endif
()
...
@@ -60,14 +60,14 @@ else()
...
@@ -60,14 +60,14 @@ else()
# Set a flag if the compiler you are using is capable of providing C++11 features.
# Set a flag if the compiler you are using is capable of providing C++11 features.
get_property
(
cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES
)
get_property
(
cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES
)
if
(
";
${
cxx_features
}
;"
MATCHES
";cxx_rvalue_references;"
AND
if
(
";
${
cxx_features
}
;"
MATCHES
";cxx_rvalue_references;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_variadic_templates;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_variadic_templates;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_lambdas;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_lambdas;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_defaulted_move_initializers;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_defaulted_move_initializers;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_delegating_constructors;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_delegating_constructors;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_thread_local;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_thread_local;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_constexpr;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_constexpr;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_decltype_incomplete_return_types;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_decltype_incomplete_return_types;"
AND
";
${
cxx_features
}
;"
MATCHES
";cxx_auto_type;"
)
";
${
cxx_features
}
;"
MATCHES
";cxx_auto_type;"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
# Tell cmake that we need C++11 for dlib
# Tell cmake that we need C++11 for dlib
...
...
Write
Preview
Markdown
is supported
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