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") +