mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 22:58:14 -05:00
If a name isn't provided, try to infer it from the git repo (#202)
* Added assert_not_defined check * Function to get package name form git uri and tests * Autofix format * If name is not provided, try to infer it from the git repo * Unset result of cpm_package_name_from_git_uri if there is no match - Also reordered tests to ensure that the result is actually unset when needed * Removed trailing spaces in README * Updated the main example with the new minimal syntax * Well... autofix format again * Update error message for missing name to reflect the possible auto-infer step * Autofix format... yet again :)
This commit is contained in:
committed by
GitHub
parent
2744b87f07
commit
4cbf443363
@@ -36,6 +36,14 @@ function(ASSERT_DEFINED KEY)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(ASSERT_NOT_DEFINED KEY)
|
||||
if(DEFINED ${KEY})
|
||||
message(FATAL_ERROR "assertion failed: '${KEY}' is defiend")
|
||||
else()
|
||||
message(STATUS "test passed: '${KEY}' is not defined")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(ASSERT_TRUTHY KEY)
|
||||
if(${${KEY}})
|
||||
message(STATUS "test passed: '${KEY}' is set truthy")
|
||||
|
||||
Reference in New Issue
Block a user