diff --git a/CMakeLists.txt b/CMakeLists.txt index b5850269ad842bd05e9a32d97010bfb81c51ce22..7a78a883a09a3f947a2680b1bd4769d02130512f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") # include dune-common to include pathtest include_directories("${CMAKE_SOURCE_DIR}") +link_directories("${CMAKE_SOURCE_DIR}") +# set(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib") +# set(ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib") +# set(LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib") # set required compiler flags for C++11 (former C++0x) find_package(CXX11Features) @@ -30,7 +34,8 @@ set(HAVE_BOOST BOOST_FOUND) find_package(SharedPtr) # actually write the config.h file to disk -configure_file(dune-common-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/dune-common-config.h) +configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +add_definitions(-DHAVE_CONFIG_H) # add subdirectories to execute CMakeLIsts.txt there add_subdirectory("dune") diff --git a/dune-common-config.h.cmake b/dune-common-config.h.cmake deleted file mode 100644 index 3ebbd2b507f1c5a55f77a8594bc43953e42ea07a..0000000000000000000000000000000000000000 --- a/dune-common-config.h.cmake +++ /dev/null @@ -1,37 +0,0 @@ -#cmakedefine01 HAVE_ARRAY -#cmakedefine01 HAVE_MPI -#cmakedefine01 HAVE_MEMORY -#cmakedefine01 HAVE_MALLOC_H -#cmakedefine01 HAVE_BOOST - -/* If this is set, the member 'size' of FieldVector is a method rather than an - enum */ -#define DUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD - -/* Define to 1 if the <array> C++11 is available and support array::fill */ -#cmakedefine HAVE_ARRAY - -/* Define to 1 if you have the <memory> header file. */ -#cmakedefine HAVE_MEMORY - -/* The namespace in which SHARED_PTR can be found */ -#cmakedefine SHARED_PTR_NAMESPACE ${SHARED_PTR_NAMESPACE} - -/* The header in which SHARED_PTR can be found */ -#cmakedefine SHARED_PTR_HEADER ${SHARED_PTR_HEADER} - -/* Define to 1 if SHARED_PTR_NAMESPACE::make_shared is usable */ -#cmakedefine HAVE_MAKE_SHARED - -/* Define to 1 if you have <boost/make_shared.hpp> */ -#cmakedefine HAVE_BOOST_MAKE_SHARED_HPP - -#cmakedefine01 HAVE_NULLPTR -#cmakedefine01 HAVE_STATIC_ASSERT -#cmakedefine01 HAVE_VARIADIC_TEMPLATES -#cmakedefine01 HAVE_VARIADIC_CONSTRUCTOR_SFINAE -#cmakedefine01 HAVE_RVALUE_REFERENCES - -/* Include allways usefull headers */ -#include <dune/common/deprecated.hh> -#include <dune/common/unused.hh> diff --git a/dune/common/CMakeLists.txt b/dune/common/CMakeLists.txt index 2cf8c19f684ac283ec8ff4ea4f7eb241f2881b76..6e72fb9d1ee9c7f7cb9ab8bc78ebad0d717a0272 100644 --- a/dune/common/CMakeLists.txt +++ b/dune/common/CMakeLists.txt @@ -1,2 +1,11 @@ add_subdirectory("parallel") add_subdirectory("test") + +add_library("dunecommon" + exceptions.cc + fmatrixev.cc + ios_state.cc + parametertree.cc + parametertreeparser.cc + path.cc + stdstreams.cc) diff --git a/dune/common/parallel/test/CMakeLists.txt b/dune/common/parallel/test/CMakeLists.txt index 17a99785949a68638b892ae91f85f5e333b9b356..e5d4914cd2bc3cde2abf312ef370d5ec47dbc826 100644 --- a/dune/common/parallel/test/CMakeLists.txt +++ b/dune/common/parallel/test/CMakeLists.txt @@ -1,4 +1,10 @@ add_executable("indexsettest" indexsettest.cc) +target_link_libraries("indexsettest" "dunecommon") + add_executable("indicestest" indicestest.cc) +target_link_libraries("indicestest" "dunecommon") + add_executable("selectiontest" selectiontest.cc) +target_link_libraries("selectiontest" "dunecommon") + add_executable("syncertest" syncertest.cc) diff --git a/dune/common/test/CMakeLists.txt b/dune/common/test/CMakeLists.txt index fa9b72986ec54725d49ccc60750c0030edda58db..8398861efc7f664b79b140243a572883073b5433 100644 --- a/dune/common/test/CMakeLists.txt +++ b/dune/common/test/CMakeLists.txt @@ -1,36 +1,63 @@ add_executable("arraylisttest" arraylisttest.cc) add_executable("arraytest" arraytest.cc) + add_executable("bigunsignedinttest" bigunsignedinttest.cc) +target_link_libraries("bigunsignedinttest" "dunecommon") + add_executable("bitsetvectortest" bitsetvectortest.cc) add_executable("conversiontest" conversiontest.cc) add_executable("deprtuplestest" deprtuplestest.cc) + add_executable("dynmatrixtest" dynmatrixtest.cc) +target_link_libraries("dynmatrixtest" "dunecommon") + add_executable("dynvectortest" dynvectortest.cc) add_executable("enumsettest" enumsettest.cc) + add_executable("fassigntest" fassigntest.cc) +target_link_libraries("fassigntest" "dunecommon") + add_executable("fmatrixtest" fmatrixtest.cc) +target_link_libraries("fmatrixtest" "dunecommon") + add_executable("fvectortest" fvectortest.cc) add_executable("gcdlcmtest" gcdlcmtest.cc) add_executable("iteratorfacadetest2" iteratorfacadetest2.cc) add_executable("iteratorfacadetest" iteratorfacadetest.cc) add_executable("lrutest" lrutest.cc) + add_executable("mpiguardtest" mpiguardtest.cc) +target_link_libraries("mpiguardtest" "dunecommon") + add_executable("mpihelpertest" mpihelpertest.cc) -add_executable("nullptr-test2" nullptr-test2.cc) add_executable("nullptr-test" nullptr-test.cc) + +#add_executable("nullptr-test2" nullptr-test2.cc) +#target_link_libraries("nullptr-test2" "dunecommon") + add_executable("parametertreetest" parametertreetest.cc) +target_link_libraries("parametertreetest" "dunecommon") + add_executable("pathtest" pathtest.cc) +target_link_libraries("pathtest" "dunecommon") + add_executable("poolallocatortest" poolallocatortest.cc) add_executable("shared_ptrtest" shared_ptrtest.cc) add_executable("singletontest" singletontest.cc) add_executable("sllisttest" sllisttest.cc) add_executable("static_assert_test" static_assert_test.cc) -add_executable("static_assert_test_fail" static_assert_test_fail.cc) +#add_executable("static_assert_test_fail" static_assert_test_fail.cc) + add_executable("streamtest" streamtest.cc) -add_executable("testfassign2" testfassign2.cc) -add_executable("testfassign" testfassign.cc) -add_executable("testfconstruct" testfconstruct.cc) +target_link_libraries("streamtest" "dunecommon") + +#add_executable("testfassign" testfassign.cc) +#add_executable("testfassign2" testfassign2.cc) +#add_executable("testfconstruct" testfconstruct.cc) + add_executable("test-stack" test-stack.cc) +target_link_libraries("test-stack" "dunecommon") + add_executable("tuplestest" tuplestest.cc) add_executable("tupleutilitytest" tupleutilitytest.cc) add_executable("utilitytest" utilitytest.cc)