summaryrefslogtreecommitdiff
path: root/cmake/Targets.cmake
diff options
context:
space:
mode:
authorphilkr <philkr@users.noreply.github.com>2015-02-18 16:38:33 (GMT)
committerphilkr <philkr@users.noreply.github.com>2015-02-18 17:27:13 (GMT)
commitd1238e14fa4ef7089d85e91cf3339699b89590e0 (patch)
treed73825620991f5fead758e039d85aa417d74b3e9 /cmake/Targets.cmake
parent5e64f5a7d174fc0a4e503c56700db291cb68e26f (diff)
downloadcaffeonacl-d1238e14fa4ef7089d85e91cf3339699b89590e0.zip
caffeonacl-d1238e14fa4ef7089d85e91cf3339699b89590e0.tar.gz
caffeonacl-d1238e14fa4ef7089d85e91cf3339699b89590e0.tar.bz2
Changing CMAKE_SOURCE/BINARY_DIR to PROJECT_SOURCE/BINARY_DIR
Diffstat (limited to 'cmake/Targets.cmake')
-rw-r--r--cmake/Targets.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmake/Targets.cmake b/cmake/Targets.cmake
index 3b254ad..e3ad872 100644
--- a/cmake/Targets.cmake
+++ b/cmake/Targets.cmake
@@ -53,7 +53,7 @@ function(caffe_pickup_caffe_sources root)
# put all files in source groups (visible as subfolder in many IDEs)
caffe_source_group("Include" GLOB "${root}/include/caffe/*.h*")
caffe_source_group("Include\\Util" GLOB "${root}/include/caffe/util/*.h*")
- caffe_source_group("Include" GLOB "${CMAKE_BINARY_DIR}/caffe_config.h*")
+ caffe_source_group("Include" GLOB "${PROJECT_BINARY_DIR}/caffe_config.h*")
caffe_source_group("Source" GLOB "${root}/src/caffe/*.cpp")
caffe_source_group("Source\\Util" GLOB "${root}/src/caffe/util/*.cpp")
caffe_source_group("Source\\Layers" GLOB "${root}/src/caffe/layers/*.cpp")
@@ -75,7 +75,7 @@ function(caffe_pickup_caffe_sources root)
list(REMOVE_ITEM srcs ${test_srcs})
# adding headers to make the visible in some IDEs (Qt, VS, Xcode)
- list(APPEND srcs ${hdrs} ${CMAKE_BINARY_DIR}/caffe_config.h)
+ list(APPEND srcs ${hdrs} ${PROJECT_BINARY_DIR}/caffe_config.h)
list(APPEND test_srcs ${test_hdrs})
# collect cuda files
@@ -107,9 +107,9 @@ endfunction()
function(caffe_default_properties target)
set_target_properties(${target} PROPERTIES
DEBUG_POSTFIX ${Caffe_DEBUG_POSTFIX}
- ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib"
+ LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib"
+ RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
endfunction()
################################################################################################
@@ -139,7 +139,7 @@ function(caffe_configure_testdatafile file)
file(STRINGS ${file} __lines)
set(result "")
foreach(line ${__lines})
- set(result "${result}${CMAKE_SOURCE_DIR}/${line}\n")
+ set(result "${result}${PROJECT_SOURCE_DIR}/${line}\n")
endforeach()
file(WRITE ${file}.gen.cmake ${result})
endfunction()