From a6b39a5adf443d1fbe2e2907ef881a4f51a77475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20St=C3=BCrmer?= Date: Mon, 15 May 2017 15:37:10 +0200 Subject: VS: Fix debugging of C++ executables if CSharp is enabled Fixes: #16867 --- Modules/CMakeCSharpInformation.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Modules/CMakeCSharpInformation.cmake b/Modules/CMakeCSharpInformation.cmake index dc775bd..cd86016 100644 --- a/Modules/CMakeCSharpInformation.cmake +++ b/Modules/CMakeCSharpInformation.cmake @@ -68,38 +68,38 @@ if(CMAKE_CSharp_STANDARD_LIBRARIES_INIT) mark_as_advanced(CMAKE_CSharp_STANDARD_LIBRARIES) endif() -# set missing flags (if they do not exist). This is needed in the +# set missing flags (if they are not defined). This is needed in the # unlikely case that you have only C# and no C/C++ targets in your # project. -if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS) +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS) set(CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_DEBUG) +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_DEBUG) set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_RELEASE) +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_RELEASE) set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL) +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL) set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO) +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO) set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS) set(CMAKE_EXE_LINKER_FLAGS "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_DEBUG) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_DEBUG) set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_RELEASE) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_RELEASE) set(CMAKE_EXE_LINKER_FLAGS_RELEASE "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_MINSIZEREL) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_MINSIZEREL) set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE) endif() -if(NOT EXISTS CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO) +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO) set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE) endif() -- cgit v0.12