From 5aa00622cbee4661e35fb3f835e34ed00a69dd74 Mon Sep 17 00:00:00 2001 From: Francois Budin Date: Mon, 15 Jan 2018 15:10:51 -0500 Subject: [PATCH] BUG: Initializes CMAKE_DEBUG_POSTFIX to be empty When GoogleTest third party module was updated (commit 5be14a56), CMAKE_DEBUG_POSTFIX was set to 'd', which means that the ITK library filenames will end with 'd'. This is not how ITK libraries used to be named. To keep backward compatibility, we remove this postfix. Change-Id: I802dcff5c6210692d64c38668b59c19c3c823662 --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2250e5967b3..05e1f7d242e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,6 +210,10 @@ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_ if(NOT CMAKE_POSITION_INDEPENDENT_CODE) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() +# Because GoogleTest sets CMAKE_DEBUG_POSTFIX CMake CACHE variable to "d" when it is +# built in debug, we preemptively set it to an empty string to avoid having a postfix +# added to the ITK library names. +set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Generate debug library name with a postfix.") # Setup build locations. if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)