Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tile_processor_gpu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
tile_processor_gpu
Commits
1caad2b9
Commit
1caad2b9
authored
Mar 02, 2022
by
Palani Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMakeLists compiles with src_files as a library
parent
b1a8395f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
CMakeLists.txt
CMakeLists.txt
+24
-12
No files found.
CMakeLists.txt
View file @
1caad2b9
...
...
@@ -13,29 +13,41 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
RESULT_VARIABLE GIT_SUBMOD_RESULT
)
if
(
NOT GIT_SUBMOD_RESULT EQUAL
"0"
)
message
(
FATAL_ERROR
"git submodule update --init --recursive failed with
${
GIT_SUBMOD_RESULT
}
, please checkout submodules"
)
message
(
FATAL_ERROR
"git submodule update --init --recursive failed with
${
GIT_SUBMOD_RESULT
}
, please checkout submodules"
)
endif
()
endif
()
endif
()
# Check submodules
foreach
(
SUBMOD IN LISTS
"cuda-samples"
)
if
(
NOT EXISTS
"
${
PROJECT_SOURCE_DIR
}
/external/
${
SUBMOD
}
/README.md"
)
message
(
FATAL_ERROR
"The submodule
${
SUBMOD
}
was not found, check git submodules."
)
endif
()
endforeach
()
if
(
NOT EXISTS
"
${
PROJECT_SOURCE_DIR
}
/external/cuda-samples/README.md"
)
message
(
FATAL_ERROR
"The submodule cuda-samples was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again."
)
endif
()
# create the executable
add_executable
(
${
PROJECT_NAME
}
src/test_tp.cu
include
(
CTest
)
# set(CMAKE_CUDA_FLAGS "-gencode arch=compute_75,code=sm_75")
# create the source files as a lib
add_library
(
src_files STATIC
src/dtt8x8.cu
src/dtt8x8.h
src/geometry_correction.cu
src/geometry_correction.h
src/test_tp.cu
src/TileProcessor.cuh
src/TileProcessor.h
src/tp_defines.h
)
include_directories
(
external/cuda-samples/Common
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES CUDA_SEPARABLE_COMPILATION ON
)
# target_compile_features(src_files PUBLIC cxx_std_11)
set_target_properties
(
src_files PROPERTIES CUDA_SEPARABLE_COMPILATION ON
)
# make tests executable
add_executable
(
${
PROJECT_NAME
}
src/test_tp.cu
)
include_directories
(
external/cuda-samples/Common
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY CUDA_SEPARABLE_COMPILATION ON
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE src_files
)
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