-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
execute_process(COMMAND ${CMAKE_COMMAND} --help-property-list | ||
OUTPUT_VARIABLE _props OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
STRING(REGEX REPLACE "\n" ";" _props "${_props}") | ||
|
||
list(REMOVE_DUPLICATES _props) | ||
|
||
function(print_target_props tgt) | ||
if(NOT TARGET ${tgt}) | ||
message(WARNING "Target ${tgt} not found") | ||
return() | ||
endif() | ||
|
||
message(STATUS "Target: ${tgt} properties") | ||
foreach(p IN LISTS _props) | ||
if(p MATCHES "<CONFIG>" AND NOT CMAKE_BUILD_TYPE) | ||
continue() | ||
endif() | ||
|
||
string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" p "${p}") | ||
|
||
get_property(v TARGET ${tgt} PROPERTY "${p}") | ||
if(v) | ||
message(STATUS "${tgt} ${p} = ${v}") | ||
endif() | ||
endforeach() | ||
endfunction() |