-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMake files for root, gtest and CLW
- Loading branch information
1 parent
64d81c8
commit 437c960
Showing
3 changed files
with
92 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
project(CLW CXX) | ||
|
||
set(SOURCES | ||
CLWCommandQueue.cpp | ||
CLWContext.cpp | ||
CLWDevice.cpp | ||
CLWEvent.cpp | ||
CLWImage2D.cpp | ||
CLWKernel.cpp | ||
CLWParallelPrimitives.cpp | ||
CLWPlatform.cpp | ||
CLWProgram.cpp | ||
ParameterHolder.cpp | ||
ReferenceCounter.cpp) | ||
|
||
add_library(CLW STATIC ${SOURCES}) | ||
|
||
if (UNIX) | ||
target_compile_options(CLW PUBLIC -std=c++11 -fPIC) | ||
elseif (APPLE) | ||
target_compile_options(CLW PUBLIC -std=c++11 -stdlib=libc++) | ||
endif (UNIX) | ||
|
||
if (RR_ALLOW_CPU_DEVICES) | ||
target_compile_definitions(CLW PUBLIC RR_ALLOW_CPU_DEVICES=1) | ||
endif(RR_ALLOW_CPU_DEVICES) | ||
|
||
target_link_libraries(CLW PUBLIC OpenCL::OpenCL) | ||
|
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,52 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
project(RadeonRays CXX) | ||
|
||
option(RR_EMBED_KERNELS "Embed CL kernels into binary module" OFF) | ||
option(RR_ALLOW_CPU_DEVICES "Allows CPU Devices" OFF) | ||
option(RR_USE_OPENCL "Use OpenCL for GPU hit testing" ON) | ||
option(RR_USE_EMBREE "Use Intel(R) Embree for CPU hit testing" OFF) | ||
option(RR_USE_VULKAN "Use vulkan for GPU hit testing" OFF) | ||
option(RR_NO_TESTS "Don't add any unit tests and remove any test functionality from the library" OFF) | ||
option(RR_ENABLE_STATIC "Create static libraries rather than dynamic" OFF) | ||
option(RR_SHARED_CALC "Link Calc(compute abstraction layer) dynamically" OFF) | ||
option(RR_ENABLE_RAYMASK "Enable ray masking in intersection kernels" OFF) | ||
option(RR_TUTORIALS "Add tutorials projects" OFF) | ||
option(RR_SAFE_MATH "use safe math" OFF) | ||
|
||
if (RR_SHARED_CALC AND RR_USE_VULKAN) | ||
message(FATAL_ERROR "shared_calc option is not yet supported for Vulkan backend") | ||
endif (RR_SHARED_CALC AND RR_USE_VULKAN) | ||
|
||
#Find required packages | ||
find_package(Threads) | ||
|
||
if (RR_EMBED_KERNELS) | ||
find_package(PythonInterp 2.7 REQUIRED) | ||
endif(RR_EMBED_KERNELS) | ||
|
||
if (RR_USE_OPENCL) | ||
find_package(OpenCL REQUIRED) | ||
endif (RR_USE_OPENCL) | ||
|
||
if (RR_USE_VULKAN) | ||
find_package(Vulkan REQUIRED) | ||
add_subdirectory(Anvil) | ||
endif (RR_USE_VULKAN) | ||
|
||
if (RR_USE_OPENCL) | ||
add_subdirectory(CLW) | ||
endif (RR_USE_OPENCL) | ||
|
||
#add_subdirectory(RadeonRays) | ||
#add_subdirectory(Calc) | ||
|
||
if (NOT RR_NO_TESTS) | ||
add_subdirectory(Gtest) | ||
# add_subdirectory(UnitTest) | ||
endif (NOT RR_NO_TESTS) | ||
|
||
if (RR_TUTORIALS) | ||
# add_subdirectory(Tutorials) | ||
endif (RR_TUTORIALS) | ||
|
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,11 @@ | ||
project(GTest) | ||
|
||
set(SOURCES | ||
src/gtest-all.cc | ||
src/gtest_main.cc) | ||
|
||
add_library(GTest STATIC ${SOURCES}) | ||
|
||
target_include_directories(GTest PUBLIC include) | ||
target_include_directories(GTest PRIVATE .) | ||
target_link_libraries(GTest PUBLIC Threads::Threads) |