-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve to print details of tpls in CMake (#126)
* Improve to print details of tpls in CMake * fix find logic in CMake * fix: serial should not be enabled if KokkosFFT_ENABLE_HOST_AND_DEVICE is OFF * fix: serial should be included for two host exec spaces case * fix: behaviour of -DKokkosFFT_ENABLE_HOST_AND_DEVICE with host exec space only * cleanup CMake based on reviews
- Loading branch information
1 parent
e3454ae
commit 9d6808e
Showing
5 changed files
with
122 additions
and
47 deletions.
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
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,31 @@ | ||
# SPDX-FileCopyrightText: (C) The Kokkos-FFT development team, see COPYRIGHT.md file | ||
# | ||
# SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception | ||
|
||
# \brief Left padding function for better alignment of a string | ||
# https://gist.github.com/jtanx/96ded5e050d5ee5b19804195ee5cf5f9 | ||
# \param output[out] Output string that may be paded | ||
# \param str[in] Input string | ||
# \param length[in] The length of an output string | ||
function(pad_string output_string input_string length) | ||
# Get the length of the input string | ||
string(LENGTH "${input_string}" input_length) | ||
|
||
# Check if padding is necessary | ||
if(${input_length} LESS ${length}) | ||
# Calculate the number of spaces needed for padding | ||
math(EXPR padding_length "${length} - ${input_length}") | ||
|
||
# Create a string of spaces for padding | ||
string(REPEAT " " ${padding_length} padding) | ||
|
||
# Append the padding to the input string | ||
set(padded_string "${padding}${input_string}") | ||
else() | ||
set(padded_string "${input_string}") | ||
endif() | ||
|
||
# Set the output variable | ||
set(${output_string} "${padded_string}" PARENT_SCOPE) | ||
endfunction() | ||
|
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