Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dennis Klein
CMake
Commits
acd2eab2
Commit
acd2eab2
authored
Oct 10, 2016
by
Brad King
Browse files
Merge branch 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into release
parents
27117014
a3c98cb3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Modules/ExternalProject.cmake
View file @
acd2eab2
...
...
@@ -1160,7 +1160,7 @@ function(_ep_command_line_to_initial_cache var args force)
endif
()
else
()
# Assume this is a list to append to the last var
li
st
(
APPEND accumulator
"
${
line
}
"
)
st
ring
(
APPEND accumulator
"
;
${
line
}
"
)
endif
()
endforeach
()
# Catch the final line of the args
...
...
Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake
View file @
acd2eab2
...
...
@@ -15,3 +15,12 @@ if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
set
(
RunCMake_TEST_FAILED
"Expected forced FOO argument"
)
return
()
endif
()
if
(
NOT
"
${
_cache
}
"
MATCHES
"set
\\
(TEST_LIST
\"
A;B;C
\"
.+
\\
)"
)
set
(
RunCMake_TEST_FAILED
"Cannot find TEST_LIST argument in cache"
)
return
()
endif
()
if
(
NOT
"
${
CMAKE_MATCH_0
}
"
MATCHES FORCE
)
set
(
RunCMake_TEST_FAILED
"Expected forced TEST_LIST argument"
)
return
()
endif
()
Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake
View file @
acd2eab2
...
...
@@ -5,4 +5,6 @@ include(ExternalProject)
ExternalProject_Add
(
FOO TMP_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
/tmp"
DOWNLOAD_COMMAND
""
CMAKE_CACHE_ARGS
"-DFOO:STRING=$<1:BAR>$<0:BAD>"
)
CMAKE_CACHE_ARGS
"-DFOO:STRING=$<1:BAR>$<0:BAD>"
"-DTEST_LIST:STRING=A;B;C"
)
Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake
View file @
acd2eab2
...
...
@@ -15,3 +15,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE)
set
(
RunCMake_TEST_FAILED
"Expected not forced FOO argument"
)
return
()
endif
()
if
(
NOT
"
${
_cache
}
"
MATCHES
"set
\\
(TEST_LIST
\"
A;B;C
\"
.+
\\
)"
)
set
(
RunCMake_TEST_FAILED
"Cannot find TEST_LIST argument in cache"
)
return
()
endif
()
if
(
"
${
CMAKE_MATCH_0
}
"
MATCHES FORCE
)
set
(
RunCMake_TEST_FAILED
"Expected not forced TEST_LIST argument"
)
return
()
endif
()
Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake
View file @
acd2eab2
...
...
@@ -5,4 +5,6 @@ include(ExternalProject)
ExternalProject_Add
(
FOO TMP_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
/tmp"
DOWNLOAD_COMMAND
""
CMAKE_CACHE_DEFAULT_ARGS
"-DFOO:STRING=$<1:BAR>$<0:BAD>"
)
CMAKE_CACHE_DEFAULT_ARGS
"-DFOO:STRING=$<1:BAR>$<0:BAD>"
"-DTEST_LIST:STRING=A;B;C"
)
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