Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

cmake: stop including files from the install directory #1112

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)

message(STATUS "Setting CMAKE_FIND_NO_INSTALL_PREFIX")
set(CMAKE_FIND_NO_INSTALL_PREFIX TRUE)

project(Caffe2 CXX C)

# TODO(bwasti): versioning
Expand Down
14 changes: 8 additions & 6 deletions cmake/Modules/FindBenchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@
# Benchmark_LIBRARIES - libraries needed to use benchmark

find_path(Benchmark_INCLUDE_DIR
NAMES benchmark/benchmark.h
DOC "The directory where benchmark includes reside"
NAMES benchmark/benchmark.h
NO_SYSTEM_ENVIRONMENT_PATH
DOC "The directory where benchmark includes reside"
)

find_library(Benchmark_LIBRARY
NAMES benchmark
DOC "The benchmark library"
NAMES benchmark
NO_SYSTEM_ENVIRONMENT_PATH
DOC "The benchmark library"
)

set(Benchmark_INCLUDE_DIRS ${Benchmark_INCLUDE_DIR})
set(Benchmark_LIBRARIES ${Benchmark_LIBRARY})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Benchmark
FOUND_VAR Benchmark_FOUND
REQUIRED_VARS Benchmark_INCLUDE_DIR Benchmark_LIBRARY
FOUND_VAR Benchmark_FOUND
REQUIRED_VARS Benchmark_INCLUDE_DIR Benchmark_LIBRARY
)

mark_as_advanced(Benchmark_FOUND)