From f2a646b417957bff84185fd9d5677ed0e94ec141 Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Sat, 1 Nov 2008 13:15:41 +0000 Subject: [PATCH] Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor [SVN r49510] --- CMakeLists.txt | 21 +++++++++++++++++++++ test/CMakeLists.txt | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7027391 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +#---------------------------------------------------------------------------- +# This file was automatically generated from the original CMakeLists.txt file +# Add a variable to hold the headers for the library +set (lib_headers + typeof +) + +# Add a library target to the build system +boost_library_project( + typeof + # SRCDIRS + TESTDIRS test + HEADERS ${lib_headers} + # DOCDIRS + # DESCRIPTION + MODULARIZED + # AUTHORS + # MAINTAINERS +) + + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..b17c811 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,21 @@ +file(GLOB TEST_FILES "*.cpp") +foreach(TEST_FILE ${TEST_FILES}) + if (TEST_FILE MATCHES "odr.*cpp") + # Skip ODR tests; we'll handle them separately + else (TEST_FILE MATCHES "odr.*cpp") + get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) + boost_test_compile("${TEST_NAME}_native" + "${TEST_NAME}.cpp" COMPILE_FLAGS "-DBOOST_TYPEOF_NATIVE") + boost_test_compile("${TEST_NAME}_emulation" + "${TEST_NAME}.cpp" COMPILE_FLAGS "-DBOOST_TYPEOF_EMULATION") + endif (TEST_FILE MATCHES "odr.*cpp") +endforeach(TEST_FILE ${TEST_FILES}) + +boost_test_run(odr_native + odr1.cpp odr2.cpp COMPILE_FLAGS "-DBOOST_TYPEOF_NATIVE") +boost_test_run(odr_emulation + odr1.cpp odr2.cpp COMPILE_FLAGS "-DBOOST_TYPEOF_EMULATION") +boost_test_run(odr_no_uns + odr_no_uns1.cpp odr_no_uns2.cpp + COMPILE_FLAGS "-DBOOST_TYPEOF_EMULATION") +