-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from swofford/tweak-cmake-builds
CMake: Don't look for OpenCL and CUDA packages if build isn't using them
- Loading branch information
Showing
1 changed file
with
15 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
|
||
find_package(OpenCL) | ||
if(OpenCL_FOUND AND BUILD_OPENCL) | ||
message(STATUS "OpenCL Includes: ${OpenCL_INCLUDE_DIRS}") | ||
message(STATUS "OpenCL Libraries: ${OpenCL_LIBRARIES}") | ||
add_subdirectory("CMake_OpenCL") | ||
endif(OpenCL_FOUND AND BUILD_OPENCL) | ||
if(BUILD_OPENCL) | ||
find_package(OpenCL) | ||
if(OpenCL_FOUND) | ||
message(STATUS "OpenCL Includes: ${OpenCL_INCLUDE_DIRS}") | ||
message(STATUS "OpenCL Libraries: ${OpenCL_LIBRARIES}") | ||
add_subdirectory("CMake_OpenCL") | ||
endif(OpenCL_FOUND) | ||
endif(BUILD_OPENCL) | ||
|
||
find_package(CUDA) | ||
if(CUDA_FOUND AND BUILD_CUDA) | ||
message(STATUS "CUDA Includes: ${CUDA_INCLUDE_DIRS}") | ||
add_subdirectory("CMake_CUDA") | ||
endif(CUDA_FOUND AND BUILD_CUDA) | ||
if(BUILD_CUDA) | ||
find_package(CUDA) | ||
if(CUDA_FOUND) | ||
message(STATUS "CUDA Includes: ${CUDA_INCLUDE_DIRS}") | ||
add_subdirectory("CMake_CUDA") | ||
endif(CUDA_FOUND) | ||
endif(BUILD_CUDA) |