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
565d9293
Commit
565d9293
authored
Oct 11, 2015
by
Davis King
Browse files
Minor tweaks to scripts so they work on older cmake versions or without cuda.
parent
969950e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+3
-5
dlib/use_cpp_11.cmake
dlib/use_cpp_11.cmake
+1
-1
No files found.
dlib/CMakeLists.txt
View file @
565d9293
...
@@ -407,13 +407,10 @@ if (NOT TARGET dlib)
...
@@ -407,13 +407,10 @@ if (NOT TARGET dlib)
if
(
DLIB_USE_CUDA
)
if
(
DLIB_USE_CUDA
)
find_package
(
CUDA
)
find_package
(
CUDA
7.0
)
if
(
CUDA_FOUND
)
if
(
CUDA_VERSION_STRING LESS
"7.0"
)
if
(
CUDA_FOUND
)
message
(
FATAL_ERROR
"dlib requires CUDA version 7.0 or higher"
)
endif
()
set
(
CUDA_HOST_COMPILATION_CPP ON
)
set
(
CUDA_HOST_COMPILATION_CPP ON
)
list
(
APPEND CUDA_NVCC_FLAGS
"-arch=sm_30;-std=c++11"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-arch=sm_30;-std=c++11"
)
...
@@ -506,6 +503,7 @@ if (NOT TARGET dlib)
...
@@ -506,6 +503,7 @@ if (NOT TARGET dlib)
# Install the library
# Install the library
if
(
NOT DLIB_IN_PROJECT_BUILD
)
if
(
NOT DLIB_IN_PROJECT_BUILD
)
cmake_minimum_required
(
VERSION 2.8.8
)
if
(
UNIX
)
if
(
UNIX
)
set_target_properties
(
dlib-shared PROPERTIES
set_target_properties
(
dlib-shared PROPERTIES
OUTPUT_NAME dlib
OUTPUT_NAME dlib
...
...
dlib/use_cpp_11.cmake
View file @
565d9293
...
@@ -25,7 +25,7 @@ if (CMAKE_VERSION VERSION_LESS "3.1")
...
@@ -25,7 +25,7 @@ if (CMAKE_VERSION VERSION_LESS "3.1")
add_global_compiler_switch
(
"-std=gnu++11"
)
add_global_compiler_switch
(
"-std=gnu++11"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
elseif
(
GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3
)
elseif
(
GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3
)
message
(
WARNING
"C++0x activated."
)
message
(
STATUS
"C++0x activated."
)
add_global_compiler_switch
(
"-std=gnu++0x"
)
add_global_compiler_switch
(
"-std=gnu++0x"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
endif
()
endif
()
...
...
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