CMake/Tests/CxxOnly/cxxonly.cxx
Brad King 5c04e77e07 VS: Restore compilation of '.C' sources as C++
Refactoring in commit 3b547e2e4b (VS: Simplify logic adding source file
C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) failed to
account for MSVC's treatment of `.C` extensions as C.  Add this special
case to the logic to restore use of `-TP` for `.C` extensions.

Fixes: #20822
2020-06-11 14:15:18 -04:00

26 lines
392 B
C++

#include "libcxx1.h"
#include "libcxx2.h"
extern int testC;
#ifdef _MSC_VER
extern int testCPP;
#endif
#include <stdio.h>
int main()
{
testC = 1;
#ifdef _MSC_VER
testCPP = 1;
#endif
if (LibCxx1Class::Method() != 2.0) {
printf("Problem with libcxx1\n");
return 1;
}
if (LibCxx2Class::Method() != 1.0) {
printf("Problem with libcxx2\n");
return 1;
}
return 0;
}