forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] Cmake modernization (pytorch#2066)
* cmake target - work in progress * wip cmake public targets * Add missing INTERFACE keyword * Add cuda public dependencies * Add dependency for test targets
- Loading branch information
Showing
11 changed files
with
156 additions
and
149 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
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
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,6 +1,5 @@ | ||
set(__target "caffe2_benchmark") | ||
add_executable(${__target} "${CMAKE_CURRENT_SOURCE_DIR}/caffe2_benchmark.cc") | ||
add_dependencies(${__target} ${Caffe2_MAIN_LIBS_ORDER}) | ||
caffe_add_linker_flag(Caffe2_CPU_OBSERVER Caffe2_CPU_OBSERVER_LINK) | ||
target_link_libraries(${__target} ${Caffe2_CPU_OBSERVER_LINK} ${Caffe2_MAIN_LIBS} ${Caffe2_DEPENDENCY_LIBS}) | ||
install(TARGETS ${__target} DESTINATION bin) |
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,31 @@ | ||
# ---[ Declare variables that we are going to use across the Caffe2 build. | ||
# This file defines common, Caffe2-wide variables that we use to collect | ||
# source files and other things. Each variable is annotated with their | ||
# intended uses. | ||
# Note that adding and / or deleting these variables usually involves | ||
# changing the whole build system, so make sure you send a PR early if you | ||
# want to change them. | ||
|
||
# Caffe2_{CPU,GPU}_SRCS is the list that will have all the related source | ||
# files for CPU and GPU respectively. They will be filled with the | ||
# CMakeLists.txt files under each folder respectively. | ||
set(Caffe2_CPU_SRCS) | ||
set(Caffe2_GPU_SRCS) | ||
|
||
# Caffe2_{CPU,GPU}_TEST_SRCS is the list that will have all the related source | ||
# files for CPU and GPU tests respectively. | ||
set(Caffe2_CPU_TEST_SRCS) | ||
set(Caffe2_GPU_TEST_SRCS) | ||
|
||
# Caffe2_MAIN_LIBS is a list of the libraries that a dependent library should | ||
# depend on when it links against Caffe2. | ||
set(Caffe2_MAIN_LIBS) | ||
|
||
# Lists for Caffe2 dependency libraries, for CPU and CUDA respectively. | ||
set(Caffe2_DEPENDENCY_LIBS "") | ||
set(Caffe2_CUDA_DEPENDENCY_LIBS "") | ||
|
||
# Lists for Caffe2 public dependency libraries. These libraries will be | ||
# transitive to any libraries that depends on Caffe2. | ||
set(Caffe2_PUBLIC_DEPENDENCY_LIBS "") | ||
set(Caffe2_PUBLIC_CUDA_DEPENDENCY_LIBS "") |
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
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
Oops, something went wrong.