https://github.com/Kitware/CMake
Revision 8b21aa0af00a6366c301241bab081f2daae6104c authored by Brad King on 02 October 2018, 18:50:23 UTC, committed by Brad King on 02 October 2018, 18:58:11 UTC
When a CSharp target links to a static C++ library, CMake will compute
the link language as C++ instead of CSharp.  That may be incorrect and
needs further investigation, but it does not affect how VS drives C#
linking.  However, it does break our flag language selection logic
and causes C++ flags to be used for CSharp.  In particular, this
drops the `-platform:x86` flag on 32-bit builds.

Fix this by always selecting the CSharp flags when generating a
`.csproj` project type.

Issue: #18239
1 parent f478fa6
Raw File
Tip revision: 8b21aa0af00a6366c301241bab081f2daae6104c authored by Brad King on 02 October 2018, 18:50:23 UTC
VS: Fix CSharp flag selection when linking to a static C++ library
Tip revision: 8b21aa0
cm_jsoncpp_writer.h
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#ifndef cm_jsoncpp_writer_h
#define cm_jsoncpp_writer_h

/* Use the jsoncpp library configured for CMake.  */
#include "cmThirdParty.h"
#ifdef CMAKE_USE_SYSTEM_JSONCPP
#  include <json/writer.h>
#else
#  include <cmjsoncpp/include/json/writer.h>
#endif

#endif
back to top