Remove usage of old behavior from cmake 2.8 policy (#217)
* fix linking of fuse in cryfs-cli, linking of cpp-utils in cryfs tests and remove cmake policy to use behaviors of cmake 2.8 instead of 3.0 * setting link dependencies in cryfs project to public, remove transitive dependencies from cryfs-cli project and cryfs test project * set gtest and gmock link dependencies from private to public in googletest project
This commit is contained in:
parent
44ea19d184
commit
1a2036749c
@ -1,5 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
||||
cmake_policy(VERSION 2.8)
|
||||
|
||||
# note: for clang-tidy, we need cmake 3.6, or (if the return code should be handled correctly, e.g. on CI), we need 3.8.
|
||||
|
||||
|
@ -48,7 +48,8 @@ set(LIB_SOURCES
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCES})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME cryfs)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE cpp-utils blockstore blobstore fspp gitversion) # TODO Check that dependent projects don't get this linked in
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils fspp)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE blockstore blobstore gitversion) # TODO Check that dependent projects don't get this linked in
|
||||
target_add_boost(${PROJECT_NAME} program_options chrono) # TODO Check that dependent projects don't get boost added (use PRIVATE here)
|
||||
target_enable_style_warnings(${PROJECT_NAME})
|
||||
target_activate_cpp14(${PROJECT_NAME})
|
||||
|
3
vendor/googletest/CMakeLists.txt
vendored
3
vendor/googletest/CMakeLists.txt
vendored
@ -5,7 +5,8 @@ if (BUILD_TESTING)
|
||||
|
||||
project (googletest)
|
||||
add_library(${PROJECT_NAME} dummy.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gtest gmock gmock_main)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC gtest gmock)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gmock_main)
|
||||
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include)
|
||||
|
||||
# Disable "missing override" warning because gmock MOCK_METHOD() don't use override :(
|
||||
|
Loading…
Reference in New Issue
Block a user