Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions analyze.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#====================================================================================================================#
Runs cmake-lint on all `.cmake` files in the Git repository
Runs cmake-lint on all `*.cmake` and `*CMakeLists.txt` files in the Git repository
=====================================================================================================================#>
$Root = $PSScriptRoot

Expand All @@ -26,19 +26,20 @@ if (-not $CMakeLint) {
}

$Failed = $false;
$CMakeFiles = & $Git ls-files "$Root/*.cmake"

foreach ($CMakeFile in $CMakeFiles) {
& $CMakeLint $CMakeFile |
'*.cmake', '*CMakeLists.txt' |
ForEach-Object {
if ($_ -match '^([^:]*):(\d+):(.*)$') {
ReportError -File $Matches[1] -LineNumber $Matches[2] -Message $_
$Failed = $true
}
else {
Write-Output $_
& $Git ls-files "$Root/$_"
} |
ForEach-Object {
& $CMakeLint $_ |
ForEach-Object {
if ($_ -match '^([^:]*):(\d+):(.*)$') {
ReportError -File $Matches[1] -LineNumber $Matches[2] -Message $_
$Failed = $true
} else {
Write-Output $_
}
}
}
}
}

exit ($Failed ? 1 : 0)
1 change: 1 addition & 0 deletions example/CommandLineWinRT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ target_link_libraries(CommandLineWinRT
)

add_custom_command(TARGET CommandLineWinRT POST_BUILD
COMMENT Copying 'CommandLineWinRT' dependencies
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CommandLineWinRT> $<TARGET_FILE_DIR:CommandLineWinRT>
COMMAND_EXPAND_LISTS
)
2 changes: 1 addition & 1 deletion example/WindowsApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ add_executable(WindowsApplication WIN32
set_source_files_properties(WindowsApplication.rc
PROPERTIES
OBJECT_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/small.ico;${CMAKE_CURRENT_LIST_DIR}/WindowsApplication.ico"
)
)