diff options
author | Brad King <brad.king@kitware.com> | 2010-09-08 15:36:46 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-09-08 15:36:46 (GMT) |
commit | f444b9555f87ec187bff51d48cd29c22ab4a6121 (patch) | |
tree | 7c7722e4566970bdd76f361756b1ab7aab855d35 /Tests | |
parent | 661d5166b06c30a7a490d28a8476989200744b87 (diff) | |
parent | 7944e4e0ac37cb1423da2de7a203557b77372aac (diff) | |
download | CMake-f444b9555f87ec187bff51d48cd29c22ab4a6121.zip CMake-f444b9555f87ec187bff51d48cd29c22ab4a6121.tar.gz CMake-f444b9555f87ec187bff51d48cd29c22ab4a6121.tar.bz2 |
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.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CxxOnly/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CxxOnly/cxxonly.cxx | 6 | ||||
-rw-r--r-- | Tests/CxxOnly/test.CPP | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt index bfc8271..d621499 100644 --- a/Tests/CxxOnly/CMakeLists.txt +++ b/Tests/CxxOnly/CMakeLists.txt @@ -2,7 +2,10 @@ project (CxxOnly CXX) 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_executable (CxxOnly cxxonly.cxx) target_link_libraries(CxxOnly testcxx1 testcxx2) diff --git a/Tests/CxxOnly/cxxonly.cxx b/Tests/CxxOnly/cxxonly.cxx index 99ccf3b..9cf6f2d 100644 --- a/Tests/CxxOnly/cxxonly.cxx +++ b/Tests/CxxOnly/cxxonly.cxx @@ -1,10 +1,16 @@ #include "libcxx1.h" #include "libcxx2.h" +#ifdef _MSC_VER +extern int testCPP; +#endif #include <stdio.h> int main () { +#ifdef _MSC_VER + testCPP = 1; +#endif if ( LibCxx1Class::Method() != 2.0 ) { printf("Problem with libcxx1\n"); diff --git a/Tests/CxxOnly/test.CPP b/Tests/CxxOnly/test.CPP new file mode 100644 index 0000000..8a3cde2 --- /dev/null +++ b/Tests/CxxOnly/test.CPP @@ -0,0 +1 @@ +int testCPP; |