diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 856320d0..322c6e77 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -9,7 +9,10 @@ cmake_policy(SET CMP0005 NEW) if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) cmake_policy(SET CMP0014 OLD) - endif(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) + endif() + if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12)) + cmake_policy(SET CMP0022 OLD) + endif() endif(COMMAND CMAKE_POLICY) endmacro(set_cmake_policies) @@ -89,7 +92,7 @@ # Adds to the CMAKE_MODULE_PATH directories guesseds from project # environment variables _USER_TOP and _TOP. # - macro(SETUP_PROJECT_PATHS project) + macro(setup_project_paths project) if( NOT("$ENV{${project}_TOP}" STREQUAL "") ) message("-- ${project}_TOP is set to $ENV{${project}_TOP}") set(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_TOP}/share/cmake/Modules/") @@ -103,7 +106,7 @@ endif( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) list(REMOVE_DUPLICATES CMAKE_MODULE_PATH) - endmacro(SETUP_PROJECT_PATHS project) + endmacro(setup_project_paths project) # diff --git a/hurricane/doc/hurricane/Collection.dox b/hurricane/doc/hurricane/Collection.dox index 3d70bbdb..832bc2ac 100644 --- a/hurricane/doc/hurricane/Collection.dox +++ b/hurricane/doc/hurricane/Collection.dox @@ -31,7 +31,25 @@ * * * - * \section secForEachMacro The forEach Macro + * \section secIterator STL Iterator Support + * + * The Collections now provides a basic iterator support to allow the + * C++11 \c for contruct: +\code + Cell* cell = ...; // Get a Cell from somewhere. + + for( Net* inet : cell->getNets() ) { + cout << "This is " << inet; + if (inet->isExternal()) + cout << " [external net]."; + cout << endl; + } +\endcode + * Although the \c forEach macro is still retained for backward compatibility, + * it is advisable to use the C++11 way. + * + * + * \section secForEachMacro The forEach Macro (obsoleted) * * Collections are to be used in conjunction with the \c forEach macro * which allows to easily iterate over the elements. Iteration is done diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index e1d61a7f..4d57912a 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -7,7 +7,6 @@ list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) - setup_project_paths(IMPORTEDS) setup_project_paths(CORIOLIS) set_cmake_policies()