-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Stop depending on the deprecated FindCUDA module, 2. Add a new FindOmrCuda module, which locates a minimum set of headers needed by OMR, 3. Stop automatically enabling OMR_OPT_CUDA when the dependencies are present. Signed-off-by: Robert Young <rwy0717@gmail.com>
- Loading branch information
Showing
6 changed files
with
85 additions
and
23 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,75 @@ | ||
############################################################################### | ||
# Copyright (c) 2019, 2019 IBM Corp. and others | ||
# | ||
# This program and the accompanying materials are made available under | ||
# the terms of the Eclipse Public License 2.0 which accompanies this | ||
# distribution and is available at http://eclipse.org/legal/epl-2.0 | ||
# or the Apache License, Version 2.0 which accompanies this distribution | ||
# and is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This Source Code may also be made available under the following Secondary | ||
# Licenses when the conditions for such availability set forth in the | ||
# Eclipse Public License, v. 2.0 are satisfied: GNU General Public License, | ||
# version 2 with the GNU Classpath Exception [1] and GNU General Public | ||
# License, version 2 with the OpenJDK Assembly Exception [2]. | ||
# | ||
# [1] https://www.gnu.org/software/classpath/license.html | ||
# [2] http://openjdk.java.net/legal/assembly-exception.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception | ||
############################################################################# | ||
|
||
# | ||
# This package locates a minimum set of cuda resources, required by the OMR_OPT_CUDA flag. | ||
# | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
set(OMR_CUDA_HOME "NOTFOUND" CACHE STRING "Path to the CUDA SDK. Takes precedence over CUDA_HOME in OMR.") | ||
|
||
set(OmrCuda_INCLUDE_DIRS "OmrCuda_INCLUDE_DIRS-NOTFOUND") | ||
|
||
set(OmrCuda_SEARCH_PATH | ||
"${OMR_CUDA_HOME}" | ||
"$ENV{CUDA_HOME}" | ||
"$ENV{CUDA_PATH}" | ||
"$ENV{CUDA_INC_PATH}" | ||
"$ENV{NVSDKCOMPUTE_ROOT}/C" | ||
"$ENV{NVSDKCUDA_ROOT}" | ||
"/opt/cuda" | ||
"/usr/opt/cuda" | ||
"/usr/local/cuda" | ||
"/cuda" | ||
"/Developer/CUDA" | ||
) | ||
|
||
find_path(OmrCuda_CUDA_H_DIR | ||
NAMES cuda.h | ||
PATHS | ||
${OmrCuda_SEARCH_PATH} | ||
PATH_SUFFIXES | ||
include | ||
DOC "The cuda.h include directory" | ||
) | ||
|
||
find_path(OmrCuda_CUDA_RUNTIME_H_DIR | ||
NAMES cuda_runtime.h | ||
PATHS | ||
"${OmrCuda_CUDA_H_DIR}" | ||
PATH_SUFFIXES | ||
include | ||
DOC "The cuda_runtime.h include directory" | ||
) | ||
|
||
find_package_handle_standard_args(OmrCuda | ||
DEFAULT_MSG | ||
OmrCuda_CUDA_H_DIR | ||
OmrCuda_CUDA_RUNTIME_H_DIR | ||
) | ||
|
||
if(OmrCuda_FOUND) | ||
set(OmrCuda_INCLUDE_DIRS | ||
"${OmrCuda_CUDA_H_DIR}" | ||
"${OmrCuda_CUDA_RUNTIME_H_DIR}" | ||
) | ||
endif() |
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