mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
Merge topic 'vs-lang-C'
5c04e77e07 VS: Restore compilation of '.C' sources as C++
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4880
This commit is contained in:
@@ -5,7 +5,7 @@ set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
|
||||
if(WIN32)
|
||||
set(EXTRA_SRCS test.CPP)
|
||||
endif()
|
||||
add_library(testcxx1.my STATIC libcxx1.cxx ${EXTRA_SRCS})
|
||||
add_library(testcxx1.my STATIC libcxx1.cxx test.C ${EXTRA_SRCS})
|
||||
add_library(testcxx2 SHARED libcxx2.cxx)
|
||||
add_executable (CxxOnly cxxonly.cxx)
|
||||
target_link_libraries(CxxOnly testcxx1.my testcxx2)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "libcxx1.h"
|
||||
#include "libcxx2.h"
|
||||
extern int testC;
|
||||
#ifdef _MSC_VER
|
||||
extern int testCPP;
|
||||
#endif
|
||||
@@ -8,6 +9,7 @@ extern int testCPP;
|
||||
|
||||
int main()
|
||||
{
|
||||
testC = 1;
|
||||
#ifdef _MSC_VER
|
||||
testCPP = 1;
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
int testC;
|
||||
Reference in New Issue
Block a user