Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BlenderPhi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raas
BlenderPhi
Commits
23fd670c
Commit
23fd670c
authored
11 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Code cleanup: cmake
parent
899caeae
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
intern/cycles/CMakeLists.txt
+21
-8
21 additions, 8 deletions
intern/cycles/CMakeLists.txt
intern/cycles/blender/CMakeLists.txt
+4
-2
4 additions, 2 deletions
intern/cycles/blender/CMakeLists.txt
intern/cycles/kernel/CMakeLists.txt
+18
-2
18 additions, 2 deletions
intern/cycles/kernel/CMakeLists.txt
with
43 additions
and
12 deletions
intern/cycles/CMakeLists.txt
+
21
−
8
View file @
23fd670c
...
...
@@ -53,7 +53,12 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-ffast-math"
)
endif
()
add_definitions
(
-DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE3 -DWITH_KERNEL_SSE41 -DWITH_KERNEL_AVX
)
add_definitions
(
-DWITH_KERNEL_SSE2
-DWITH_KERNEL_SSE3
-DWITH_KERNEL_SSE41
-DWITH_KERNEL_AVX
)
# for OSL
if
(
WIN32 AND MSVC
)
...
...
@@ -64,10 +69,15 @@ endif()
# Definitions and Includes
add_definitions
(
${
BOOST_DEFINITIONS
}
${
OPENIMAGEIO_DEFINITIONS
}
)
add_definitions
(
${
BOOST_DEFINITIONS
}
${
OPENIMAGEIO_DEFINITIONS
}
)
add_definitions
(
-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {
)
add_definitions
(
-DCCL_NAMESPACE_END=}
)
add_definitions
(
-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {
-DCCL_NAMESPACE_END=}
)
if
(
WITH_CYCLES_NETWORK
)
add_definitions
(
-DWITH_NETWORK
)
...
...
@@ -91,9 +101,11 @@ if(WITH_CYCLES_OSL)
include_directories
(
${
OSL_INCLUDES
}
)
endif
()
add_definitions
(
-DWITH_OPENCL
)
add_definitions
(
-DWITH_CUDA
)
add_definitions
(
-DWITH_MULTI
)
add_definitions
(
-DWITH_OPENCL
-DWITH_CUDA
-DWITH_MULTI
)
include_directories
(
SYSTEM
...
...
@@ -101,7 +113,8 @@ include_directories(
${
OPENIMAGEIO_INCLUDE_DIRS
}
${
OPENIMAGEIO_INCLUDE_DIRS
}
/OpenImageIO
${
OPENEXR_INCLUDE_DIR
}
${
OPENEXR_INCLUDE_DIRS
}
)
${
OPENEXR_INCLUDE_DIRS
}
)
# Subdirectories
...
...
This diff is collapsed.
Click to expand it.
intern/cycles/blender/CMakeLists.txt
+
4
−
2
View file @
23fd670c
...
...
@@ -50,8 +50,10 @@ add_definitions(-DGLEW_STATIC)
blender_add_lib
(
bf_intern_cycles
"
${
SRC
}
"
"
${
INC
}
"
"
${
INC_SYS
}
"
)
if
(
APPLE
)
if
(
${
CMAKE_GENERATOR
}
MATCHES
"Xcode"
AND
${
XCODE_VERSION
}
VERSION_GREATER 5.0
)
# avoid link failure with clang 3.4 debug
SET_TARGET_PROPERTIES
(
bf_intern_cycles PROPERTIES XCODE_ATTRIBUTE_CLANG_DEBUG_INFORMATION_LEVEL
"line-tables-only"
)
# -gline-tables-only
# avoid link failure with clang 3.4 debug
if
(
${
CMAKE_GENERATOR
}
MATCHES
"Xcode"
AND
${
XCODE_VERSION
}
VERSION_GREATER 5.0
)
# -gline-tables-only
set_target_properties
(
bf_intern_cycles PROPERTIES XCODE_ATTRIBUTE_CLANG_DEBUG_INFORMATION_LEVEL
"line-tables-only"
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
intern/cycles/kernel/CMakeLists.txt
+
18
−
2
View file @
23fd670c
...
...
@@ -144,7 +144,9 @@ if(WITH_CYCLES_CUDA_BINARIES)
# warn for other versions
if
(
CUDA_VERSION MATCHES
"50"
)
else
()
message
(
WARNING
"CUDA version
${
CUDA_VERSION_MAJOR
}
.
${
CUDA_VERSION_MINOR
}
detected, build may succeed but only CUDA 5.0 is officially supported"
)
message
(
WARNING
"CUDA version
${
CUDA_VERSION_MAJOR
}
.
${
CUDA_VERSION_MINOR
}
detected, "
"build may succeed but only CUDA 5.0 is officially supported"
)
endif
()
# build for each arch
...
...
@@ -172,7 +174,21 @@ if(WITH_CYCLES_CUDA_BINARIES)
else
()
add_custom_command
(
OUTPUT
${
cuda_cubin
}
COMMAND
${
CUDA_NVCC_EXECUTABLE
}
-arch=
${
arch
}
-m
${
CUDA_BITS
}
--cubin
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernel.cu -o
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
cuda_cubin
}
--ptxas-options=
"-v"
${
cuda_arch_flags
}
${
cuda_version_flags
}
${
cuda_math_flags
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../util -I
${
CMAKE_CURRENT_SOURCE_DIR
}
/svm -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
COMMAND
${
CUDA_NVCC_EXECUTABLE
}
-arch=
${
arch
}
-m
${
CUDA_BITS
}
--cubin
${
CMAKE_CURRENT_SOURCE_DIR
}
/kernel.cu
-o
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
cuda_cubin
}
--ptxas-options=
"-v"
${
cuda_arch_flags
}
${
cuda_version_flags
}
${
cuda_math_flags
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../util
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/svm
-DCCL_NAMESPACE_BEGIN=
-DCCL_NAMESPACE_END=
-DNVCC
DEPENDS
${
cuda_sources
}
)
delayed_install
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
cuda_cubin
}
"
${
CYCLES_INSTALL_PATH
}
/lib
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment