aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-02-28 08:55:39 -0500
committerGitHub <noreply@github.com>2018-02-28 08:55:39 -0500
commit9557d29b7a5f3476ce024ae54410c997b9088f4a (patch)
tree55065890101d41f9a36774cdd8032fc7bd9eb6d6
parentfe1144246e7ecae688608f7ed0a7ec1ee3e2d2af (diff)
parent66d71756a72ab31311de963fef23b74f15a6454b (diff)
downloadgoogletest-9557d29b7a5f3476ce024ae54410c997b9088f4a.tar.gz
googletest-9557d29b7a5f3476ce024ae54410c997b9088f4a.tar.bz2
googletest-9557d29b7a5f3476ce024ae54410c997b9088f4a.zip
Merge pull request #1481 from dneto0/debug-postfix
Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIX
-rw-r--r--googletest/CMakeLists.txt2
-rw-r--r--googletest/cmake/internal_utils.cmake4
2 files changed, 4 insertions, 2 deletions
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
index 77b55cae..5c392e2c 100644
--- a/googletest/CMakeLists.txt
+++ b/googletest/CMakeLists.txt
@@ -27,8 +27,6 @@ option(
"Build gtest with internal symbols hidden in shared libraries."
OFF)
-set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Generate debug library name with a postfix.")
-
# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
include(cmake/hermetic_build.cmake OPTIONAL)
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 3277cc5c..6448918f 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -158,6 +158,10 @@ function(cxx_library_with_type name type cxx_flags)
set_target_properties(${name}
PROPERTIES
COMPILE_FLAGS "${cxx_flags}")
+ # Generate debug library name with a postfix.
+ set_target_properties(${name}
+ PROPERTIES
+ DEBUG_POSTFIX "d")
if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
set_target_properties(${name}
PROPERTIES