Merge topic 'allow_upper_case_cpp_and_others'
7944e4e
Allow testing of .CPP on WIN32 as it is a case insensitive OS and should work.ba0a890
Only test for .CPP on Microsoft compilers which will handle .CPP as c++.d26cd46
Only use .CPP .CXX and .C++ do not work by default with g+++.ced61f5
Let CMake recognize .CPP .CXX and .C++ as c++ files.
This commit is contained in:
commit
f444b9555f
|
@ -21,8 +21,8 @@ IF(CMAKE_COMPILER_IS_MINGW)
|
||||||
SET(MINGW 1)
|
SET(MINGW 1)
|
||||||
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
||||||
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
|
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||||
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||||
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
|
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||||
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
|
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||||
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
project (CxxOnly CXX)
|
project (CxxOnly CXX)
|
||||||
|
|
||||||
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
|
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
|
||||||
add_library(testcxx1 STATIC libcxx1.cxx)
|
if(WIN32)
|
||||||
|
set(EXTRA_SRCS test.CPP)
|
||||||
|
endif()
|
||||||
|
add_library(testcxx1 STATIC libcxx1.cxx ${EXTRA_SRCS})
|
||||||
add_library(testcxx2 SHARED libcxx2.cxx)
|
add_library(testcxx2 SHARED libcxx2.cxx)
|
||||||
add_executable (CxxOnly cxxonly.cxx)
|
add_executable (CxxOnly cxxonly.cxx)
|
||||||
target_link_libraries(CxxOnly testcxx1 testcxx2)
|
target_link_libraries(CxxOnly testcxx1 testcxx2)
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
#include "libcxx1.h"
|
#include "libcxx1.h"
|
||||||
#include "libcxx2.h"
|
#include "libcxx2.h"
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
extern int testCPP;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
testCPP = 1;
|
||||||
|
#endif
|
||||||
if ( LibCxx1Class::Method() != 2.0 )
|
if ( LibCxx1Class::Method() != 2.0 )
|
||||||
{
|
{
|
||||||
printf("Problem with libcxx1\n");
|
printf("Problem with libcxx1\n");
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
int testCPP;
|
Loading…
Reference in New Issue