Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
CAMP
campvis-public
Commits
0674df59
Commit
0674df59
authored
Jan 17, 2015
by
Declara Denis
Committed by
Christian Schulte zu Berge
Feb 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified CMake file to support Visual Studio
parent
b0737b5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
32 deletions
+45
-32
modules/cudaconfidencemaps/cudaconfidencemaps.cmake
modules/cudaconfidencemaps/cudaconfidencemaps.cmake
+45
-32
No files found.
modules/cudaconfidencemaps/cudaconfidencemaps.cmake
View file @
0674df59
# CMake file for vis module
IF
(
${
ModuleEnabled
}
)
# Find CUDA
# Find CUDA
FIND_PACKAGE
(
CUDA REQUIRED
)
if
(
CUDA_FOUND
)
# Source files:
FILE
(
GLOB ThisModSources RELATIVE
${
ModulesDir
}
modules/cudaconfidencemaps/core/*.cpp
modules/cudaconfidencemaps/pipelines/*.cpp
modules/cudaconfidencemaps/processors/*.cpp
)
# Header files (including GLSL files so that they'll appear in VS projects)
FILE
(
GLOB ThisModHeaders RELATIVE
${
ModulesDir
}
modules/cudaconfidencemaps/glsl/*.frag
modules/cudaconfidencemaps/glsl/*.geom
modules/cudaconfidencemaps/glsl/*.vert
modules/cudaconfidencemaps/pipelines/*.h
modules/cudaconfidencemaps/processors/*.h
)
# Build CUDA sources
set
(
CUDA_PROPAGATE_HOST_FLAGS OFF
)
# Otherwise -std=c++11 is passed, which does not work with cuda compilers
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-O3
)
file
(
GLOB cuda_SOURCES modules/cudaconfidencemaps/core/*.cu
)
cuda_add_library
(
CudaConfidenceMaps_CUDA
${
cuda_SOURCES
}
)
LIST
(
APPEND ThisModExternalLibs CudaConfidenceMaps_CUDA
)
SET
(
ThisModShaderDirectories
"modules/cudaconfidencemaps/glsl"
)
SET
(
ThisModDependencies base io
)
else
()
MESSAGE
(
FATAL_ERROR
"Could not find CUDA SDK."
)
endif
()
# Source files:
FILE
(
GLOB ThisModSources RELATIVE
${
ModulesDir
}
modules/cudaconfidencemaps/core/*.cpp
modules/cudaconfidencemaps/pipelines/*.cpp
modules/cudaconfidencemaps/processors/*.cpp
)
# Header files (including GLSL files so that they'll appear in VS projects)
FILE
(
GLOB ThisModHeaders RELATIVE
${
ModulesDir
}
modules/cudaconfidencemaps/glsl/*.frag
modules/cudaconfidencemaps/glsl/*.geom
modules/cudaconfidencemaps/glsl/*.vert
modules/cudaconfidencemaps/pipelines/*.h
modules/cudaconfidencemaps/processors/*.h
)
IF
(
NOT WIN32
)
# Otherwise -std=c++11 is passed to the compiler on linux. However official
# c++11 support for cuda is only available in CUDA 7
set
(
CUDA_PROPAGATE_HOST_FLAGS OFF
)
ENDIF
()
IF
(
CMAKE_BUILD_TYPE MATCHES RELEASE
)
# Enable optimizations when building a release version
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;-O3
)
ENDIF
()
# Build CUDA sources
file
(
GLOB cuda_SOURCES modules/cudaconfidencemaps/core/*.cu
)
CUDA_ADD_LIBRARY
(
CudaConfidenceMaps_CUDA STATIC
${
cuda_SOURCES
}
)
# Make sure code can find the CUSP include files included with this module
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
;
"-I
${
ThisModDir
}
/ext/cusplibrary-0.4.0"
)
LIST
(
APPEND ThisModExternalLibs CudaConfidenceMaps_CUDA
)
SET
(
ThisModShaderDirectories
"modules/cudaconfidencemaps/glsl"
)
SET
(
ThisModDependencies base io
)
else
()
MESSAGE
(
FATAL_ERROR
"Could not find CUDA SDK."
)
endif
()
ENDIF
(
${
ModuleEnabled
}
)
SET
(
ThisModStatus EXPERIMENTAL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment