[cmake-commits] martink committed CMakeLists.txt NONE 1.1 cxxonly.cxx
NONE 1.1 libcxx1.cxx NONE 1.1 libcxx1.h NONE 1.1 libcxx2.h.in NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Mar 6 14:52:41 EST 2007
Update of /cvsroot/CMake/CMake/Tests/NewlineArgs
In directory public:/mounts/ram/cvs-serv17190/NewlineArgs
Added Files:
CMakeLists.txt cxxonly.cxx libcxx1.cxx libcxx1.h libcxx2.h.in
Log Message:
ENH: added a tets for newlines in some commands
--- NEW FILE: cxxonly.cxx ---
#include "libcxx1.h"
#include "libcxx2.h"
#include <stdio.h>
int main ()
{
if ( LibCxx1Class::Method() != 2.0 )
{
printf("Problem with libcxx1\n");
return 1;
}
#ifdef TEST_FLAG_3
return 0;
#else
printf("Problem with libcxx2.h include dir probably!\n");
return 1;
#endif
}
--- NEW FILE: libcxx1.h ---
class LibCxx1Class
{
public:
#ifdef TEST_FLAG_1
#ifdef TEST_FLAG_2
static float Method();
#endif
#endif
};
--- NEW FILE: libcxx1.cxx ---
#include "libcxx1.h"
#ifdef TEST_FLAG_1
#ifdef TEST_FLAG_2
float LibCxx1Class::Method()
{
return 2.0;
}
#endif
#endif
--- NEW FILE: CMakeLists.txt ---
# a simple CXX only test case
project (newlineargs CXX)
add_definitions("-DTEST_FLAG_1
-DTEST_FLAG_2")
include_directories("${newlineargs_BINARY_DIR}
${newlineargs_SOURCE_DIR}")
configure_file("${newlineargs_SOURCE_DIR}/libcxx2.h.in"
"${newlineargs_BINARY_DIR}/libcxx2.h")
add_library(testcxx1 libcxx1.cxx)
add_executable (cxxonly cxxonly.cxx)
target_link_libraries(cxxonly testcxx1)
--- NEW FILE: libcxx2.h.in ---
#ifdef TEST_FLAG_1
#ifdef TEST_FLAG_2
#define TEST_FLAG_3
#endif
#endif
More information about the Cmake-commits
mailing list