CMakeLists.txt (googletest-release-1.11.0) | : | CMakeLists.txt (googletest-release-1.12.0) | ||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
######################################################################## | ######################################################################## | |||
# | # | |||
# Project-wide settings | # Project-wide settings | |||
# Name of the project. | # Name of the project. | |||
# | # | |||
# CMake files in this project can refer to the root source directory | # CMake files in this project can refer to the root source directory | |||
# as ${gmock_SOURCE_DIR} and to the root binary directory as | # as ${gmock_SOURCE_DIR} and to the root binary directory as | |||
# ${gmock_BINARY_DIR}. | # ${gmock_BINARY_DIR}. | |||
# Language "C" is required for find_package(Threads). | # Language "C" is required for find_package(Threads). | |||
if (CMAKE_VERSION VERSION_LESS 3.0) | cmake_minimum_required(VERSION 3.5) | |||
project(gmock CXX C) | cmake_policy(SET CMP0048 NEW) | |||
else() | project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) | |||
cmake_policy(SET CMP0048 NEW) | ||||
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) | ||||
endif() | ||||
cmake_minimum_required(VERSION 2.8.12) | ||||
if (COMMAND set_up_hermetic_build) | if (COMMAND set_up_hermetic_build) | |||
set_up_hermetic_build() | set_up_hermetic_build() | |||
endif() | endif() | |||
# Instructs CMake to process Google Test's CMakeLists.txt and add its | # Instructs CMake to process Google Test's CMakeLists.txt and add its | |||
# targets to the current scope. We are placing Google Test's binary | # targets to the current scope. We are placing Google Test's binary | |||
# directory in a subdirectory of our own as VC compilation may break | # directory in a subdirectory of our own as VC compilation may break | |||
# if they are the same (the default). | # if they are the same (the default). | |||
add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}") | add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}") | |||
skipping to change at line 111 | skipping to change at line 107 | |||
target_link_libraries(gmock PUBLIC gtest) | target_link_libraries(gmock PUBLIC gtest) | |||
set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION}) | set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION}) | |||
cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) | cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) | |||
target_link_libraries(gmock_main PUBLIC gmock) | target_link_libraries(gmock_main PUBLIC gmock) | |||
set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) | set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) | |||
endif() | endif() | |||
# If the CMake version supports it, attach header directory information | # If the CMake version supports it, attach header directory information | |||
# to the targets for when we are part of a parent build (ie being pulled | # to the targets for when we are part of a parent build (ie being pulled | |||
# in via add_subdirectory() rather than being a standalone build). | # in via add_subdirectory() rather than being a standalone build). | |||
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") | if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") | |||
string(REPLACE ";" "$<SEMICOLON>" dirs "${gmock_build_include_dirs}") | ||||
target_include_directories(gmock SYSTEM INTERFACE | target_include_directories(gmock SYSTEM INTERFACE | |||
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>" | "$<BUILD_INTERFACE:${dirs}>" | |||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>") | "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>") | |||
target_include_directories(gmock_main SYSTEM INTERFACE | target_include_directories(gmock_main SYSTEM INTERFACE | |||
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>" | "$<BUILD_INTERFACE:${dirs}>" | |||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>") | "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>") | |||
endif() | endif() | |||
######################################################################## | ######################################################################## | |||
# | # | |||
# Install rules | # Install rules | |||
install_project(gmock gmock_main) | install_project(gmock gmock_main) | |||
######################################################################## | ######################################################################## | |||
# | # | |||
skipping to change at line 156 | skipping to change at line 153 | |||
endif() | endif() | |||
############################################################ | ############################################################ | |||
# C++ tests built with standard compiler flags. | # C++ tests built with standard compiler flags. | |||
cxx_test(gmock-actions_test gmock_main) | cxx_test(gmock-actions_test gmock_main) | |||
cxx_test(gmock-cardinalities_test gmock_main) | cxx_test(gmock-cardinalities_test gmock_main) | |||
cxx_test(gmock_ex_test gmock_main) | cxx_test(gmock_ex_test gmock_main) | |||
cxx_test(gmock-function-mocker_test gmock_main) | cxx_test(gmock-function-mocker_test gmock_main) | |||
cxx_test(gmock-internal-utils_test gmock_main) | cxx_test(gmock-internal-utils_test gmock_main) | |||
cxx_test(gmock-matchers_test gmock_main) | cxx_test(gmock-matchers-arithmetic_test gmock_main) | |||
cxx_test(gmock-matchers-comparisons_test gmock_main) | ||||
cxx_test(gmock-matchers-containers_test gmock_main) | ||||
cxx_test(gmock-matchers-misc_test gmock_main) | ||||
cxx_test(gmock-more-actions_test gmock_main) | cxx_test(gmock-more-actions_test gmock_main) | |||
cxx_test(gmock-nice-strict_test gmock_main) | cxx_test(gmock-nice-strict_test gmock_main) | |||
cxx_test(gmock-port_test gmock_main) | cxx_test(gmock-port_test gmock_main) | |||
cxx_test(gmock-spec-builders_test gmock_main) | cxx_test(gmock-spec-builders_test gmock_main) | |||
cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc) | cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc) | |||
cxx_test(gmock_test gmock_main) | cxx_test(gmock_test gmock_main) | |||
if (DEFINED GTEST_HAS_PTHREAD) | if (DEFINED GTEST_HAS_PTHREAD) | |||
cxx_test(gmock_stress_test gmock) | cxx_test(gmock_stress_test gmock) | |||
endif() | endif() | |||
End of changes. 5 change blocks. | ||||
10 lines changed or deleted | 10 lines changed or added |