-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ci-for-nvhpc-debug-build
- Loading branch information
Showing
193 changed files
with
21,390 additions
and
16,422 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
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,39 @@ | ||
param( | ||
[string]$BuildDirectory="build", | ||
[string]$Compiler="cl", | ||
[string]$Config="Debug" | ||
) | ||
|
||
function Invoke-NativeCommand($Command) { | ||
& $Command $Args | ||
|
||
if (!$?) { | ||
throw "${Command}: $LastExitCode" | ||
} | ||
} | ||
|
||
$VSVersion = 2022 | ||
$VSEdition = 'Enterprise' | ||
$Architecture = 'x64' | ||
|
||
Push-Location "C:/Program Files/Microsoft Visual Studio/$VSVersion/$VSEdition/VC/Auxiliary/Build" | ||
$VCVersion = Get-Content 'Microsoft.VCToolsVersion.default.txt' | ||
cmd /c "vcvarsall.bat $Architecture -vcvars_ver=$VCVersion > nul & set" | ForEach-Object { | ||
if ($_ -match '^(.+?)=(.*)') { | ||
Set-Item -Force -Path "ENV:$($matches[1])" -Value $matches[2] | ||
} | ||
} | ||
Pop-Location | ||
|
||
if ($Compiler -ne "cl") { | ||
$ENV:CXX=$Compiler | ||
} | ||
|
||
if (Test-Path -PathType Container $BuildDirectory) { | ||
Remove-Item -Recurse $BuildDirectory | Out-Null | ||
} | ||
New-Item -ItemType Directory $BuildDirectory | Out-Null | ||
|
||
Invoke-NativeCommand cmake -B $BuildDirectory -G Ninja "-DCMAKE_BUILD_TYPE=$Config" . | ||
Invoke-NativeCommand cmake --build $BuildDirectory | ||
Invoke-NativeCommand ctest --test-dir $BuildDirectory |
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,95 @@ | ||
# | ||
# Copyright (c) 2023 Maikel Nadolski | ||
# Copyright (c) 2023 NVIDIA Corporation | ||
# | ||
# Licensed under the Apache License Version 2.0 with LLVM Exceptions | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# https://llvm.org/LICENSE.txt | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
#[=======================================================================[.rst: | ||
Findnuma | ||
------- | ||
Finds the numa library. | ||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
This module provides the following imported targets, if found: | ||
``numa::numa`` | ||
The numa library | ||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
This will define the following variables: | ||
``numa_FOUND`` | ||
True if the system has the Foo library. | ||
``numa_VERSION`` | ||
The version of the Foo library which was found. | ||
``numa_INCLUDE_DIRS`` | ||
Include directories needed to use Foo. | ||
``numa_LIBRARIES`` | ||
Libraries needed to link to Foo. | ||
Cache Variables | ||
^^^^^^^^^^^^^^^ | ||
The following cache variables may also be set: | ||
``numa_INCLUDE_DIR`` | ||
The directory containing ``numa.h``. | ||
``numa_LIBRARY`` | ||
The path to the Foo library. | ||
#]=======================================================================] | ||
|
||
find_path(numa_INCLUDE_DIR | ||
NAMES numa.h | ||
PATHS ${PC_Foo_INCLUDE_DIRS} | ||
PATH_SUFFIXES numa | ||
) | ||
find_library(numa_LIBRARY | ||
NAMES numa | ||
PATHS ${PC_Foo_LIBRARY_DIRS} | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(numa | ||
FOUND_VAR numa_FOUND | ||
REQUIRED_VARS | ||
numa_LIBRARY | ||
numa_INCLUDE_DIR | ||
VERSION_VAR numa_VERSION | ||
) | ||
|
||
if(numa_FOUND) | ||
set(numa_LIBRARIES ${numa_LIBRARY}) | ||
set(numa_INCLUDE_DIRS ${numa_INCLUDE_DIR}) | ||
set(numa_DEFINITIONS ${PC_numa_CFLAGS_OTHER}) | ||
endif() | ||
|
||
if(numa_FOUND AND NOT TARGET numa::numa) | ||
add_library(numa::numa UNKNOWN IMPORTED) | ||
set_target_properties(numa::numa PROPERTIES | ||
IMPORTED_LOCATION "${numa_LIBRARY}" | ||
INTERFACE_COMPILE_OPTIONS "${PC_numa_CFLAGS_OTHER}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${numa_INCLUDE_DIR}" | ||
) | ||
endif() | ||
|
||
mark_as_advanced( | ||
numa_INCLUDE_DIR | ||
numa_LIBRARY | ||
) |
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 @@ | ||
diff --git a/icm_build_failure_parse_and_run.cmake b/icm_build_failure_parse_and_run.cmake | ||
index 0e62f6c..2ea5f0a 100644 | ||
--- a/icm_build_failure_parse_and_run.cmake | ||
+++ b/icm_build_failure_parse_and_run.cmake | ||
@@ -29,14 +29,15 @@ endif() | ||
|
||
# collect possible errors from source | ||
file(READ "@parsedSourcePath@" sourceText) | ||
+ | ||
string(REGEX MATCHALL "//[ ]*build error:[^\n]+" matchErrors ${sourceText}) | ||
|
||
# look for collected errors in output | ||
foreach(possibleError ${matchErrors}) | ||
string(REGEX MATCH "//[ ]*build error:[ \t]*(.+)$" _ "${possibleError}") | ||
set(possibleError "${CMAKE_MATCH_1}") | ||
- string(FIND "${out}" "${possibleError}" pos) | ||
- if(NOT pos EQUAL -1) | ||
+ string(REGEX MATCH "${possibleError}" actualError "${out}") | ||
+ if(NOT "${actualError}" STREQUAL "") | ||
message("Success: output when building '@ARG_TARGET@' contains '${possibleError}'") | ||
return() | ||
endif() | ||
@@ -48,4 +49,4 @@ endforeach() | ||
# print execute_process output for debugging purposes | ||
message("${out}") | ||
# print error | ||
-message(FATAL_ERROR "Error: Building '@ARG_TARGET@' failed, but output doesn't contain any of the expected errors:${outErrors}") | ||
+message(FATAL_ERROR "Error: Building '@ARG_TARGET@' failed, but output doesn't match the expected errors:${outErrors}") |
Oops, something went wrong.