Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
89d0c712
Commit
89d0c712
authored
Jul 17, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compatibility with CMake 3.4 (#1779)
parent
f19b1a52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
CMakeLists.txt
CMakeLists.txt
+13
-5
No files found.
CMakeLists.txt
View file @
89d0c712
...
@@ -24,15 +24,23 @@ function(join result_var)
...
@@ -24,15 +24,23 @@ function(join result_var)
set
(
${
result_var
}
"
${
result
}
"
PARENT_SCOPE
)
set
(
${
result_var
}
"
${
result
}
"
PARENT_SCOPE
)
endfunction
()
endfunction
()
include
(
CMakeParseArguments
)
# Sets a cache variable with a docstring joined from multiple arguments:
# Sets a cache variable with a docstring joined from multiple arguments:
# set(<variable> <value>... CACHE <type> <docstring>...)
# set(<variable> <value>... CACHE <type> <docstring>...)
# This allows splitting a long docstring for readability.
# This allows splitting a long docstring for readability.
function
(
set_verbose
)
function
(
set_verbose
)
cmake_parse_arguments
(
SET_VERBOSE
""
""
"CACHE"
${
ARGN
}
)
# cmake_parse_arguments is broken in CMake 3.4 (cannot parse CACHE) so use
list
(
GET SET_VERBOSE_CACHE 0 type
)
# list instead.
list
(
REMOVE_AT SET_VERBOSE_CACHE 0
)
list
(
GET ARGN 0 var
)
join
(
doc
${
SET_VERBOSE_CACHE
}
)
list
(
REMOVE_AT ARGN 0
)
set
(
${
SET_VERBOSE_UNPARSED_ARGUMENTS
}
CACHE
${
type
}
${
doc
}
)
list
(
GET ARGN 0 val
)
list
(
REMOVE_AT ARGN 0
)
list
(
REMOVE_AT ARGN 0
)
list
(
GET ARGN 0 type
)
list
(
REMOVE_AT ARGN 0
)
join
(
doc
${
ARGN
}
)
set
(
${
var
}
${
val
}
CACHE
${
type
}
${
doc
}
)
endfunction
()
endfunction
()
# Set the default CMAKE_BUILD_TYPE to Release.
# Set the default CMAKE_BUILD_TYPE to Release.
...
...
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