mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 22:03:43 +01:00
separate some tests in c++11 dir for old compilers.
new policy : for non standard conforming compilers, we can skip the tests using new features using recent c++ features. I.e. compilers below gcc 4.8.1, clang 3.3.
This commit is contained in:
parent
44bf1e322a
commit
4f4c697897
@ -414,6 +414,7 @@ endif (PythonSupport)
|
||||
## Remove the test from the build ?
|
||||
option(Build_Triqs_General_Tools_Test "Build the test of the general tool ? ( array class , ... ) " ON)
|
||||
if (Build_Triqs_General_Tools_Test)
|
||||
message( STATUS "-------- Preparing tests -------------")
|
||||
add_subdirectory(${TRIQS_SOURCE_DIR}/test )
|
||||
endif()
|
||||
|
||||
|
@ -32,6 +32,7 @@ set(TRIQS_LIBRARY_GSL @GSL_LIBRARIES@)
|
||||
set(TRIQS_WITH_PYTHON_SUPPORT @TRIQS_WITH_PYTHON_SUPPORT@)
|
||||
set(TRIQS_HDF5_DIFF_EXECUTABLE @TRIQS_HDF5_DIFF_EXECUTABLE@)
|
||||
set(TRIQS_PYTHON_LIB_DEST @TRIQS_PYTHON_LIB_DEST@)
|
||||
set(TRIQS_COMPILER_IS_C11_COMPLIANT @TRIQS_COMPILER_IS_C11_COMPLIANT@)
|
||||
|
||||
# for people who want to quickly add everything TRIQS has detected...
|
||||
set(TRIQS_LIBRARY_ALL ${TRIQS_LIBRARY} ${TRIQS_LIBRARY_BOOST} ${TRIQS_LIBRARY_PYTHON} ${TRIQS_LIBRARY_MPI} ${TRIQS_LIBRARY_HDF5} ${TRIQS_LIBRARY_LAPACK} ${TRIQS_LIBRARY_FFTW} ${TRIQS_LIBRARY_GMP} ${TRIQS_LIBRARY_GSL} )
|
||||
|
@ -15,6 +15,21 @@ macro(all_tests )
|
||||
endif()
|
||||
ENDFOREACH( TestName1 ${TestList} )
|
||||
|
||||
FILE(GLOB TestList RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} c++11/*.cpp)
|
||||
FOREACH( TestName1 ${TestList} )
|
||||
STRING(REPLACE ".cpp" "" TestName2 ${TestName1})
|
||||
STRING(REPLACE "c++11/" "" TestName ${TestName2})
|
||||
if(TRIQS_COMPILER_IS_C11_COMPLIANT)
|
||||
add_executable( ${TestName} ${CMAKE_CURRENT_SOURCE_DIR}/c++11/${TestName}.cpp )
|
||||
add_test_C_simple( ${TestName})
|
||||
if (TESTS_C_WITH_VALGRIND)
|
||||
add_test ( ${TestName}_valgrind valgrind --error-exitcode=1 ${CMAKE_CURRENT_BINARY_DIR}/c++11/${TestName})
|
||||
endif()
|
||||
else()
|
||||
MESSAGE(STATUS "WARNING: Deactivating the test ${TestName} : this obsolete compiler does not implement the C++ standard")
|
||||
endif()
|
||||
ENDFOREACH( TestName1 ${TestList} )
|
||||
|
||||
endmacro()
|
||||
|
||||
add_all_subdirectories_with_cmakelist()
|
||||
|
@ -22,6 +22,10 @@
|
||||
#define TRIQS_GF_CURRY_H
|
||||
#include "./product.hpp"
|
||||
|
||||
#ifndef TRIQS_COMPILER_IS_C11_COMPLIANT
|
||||
#error "This header requires a fully C++11 compliant compiler"
|
||||
#endif
|
||||
|
||||
namespace triqs { namespace gfs {
|
||||
|
||||
template<typename F> struct lambda_valued {};
|
||||
@ -54,7 +58,7 @@ namespace triqs { namespace gfs {
|
||||
// - m : returns from a CP object the corresponding tuple of meshes of the remaining meshes
|
||||
// after partial eval (of the type computed by "type").
|
||||
// - auxiliary data :
|
||||
// pos : position in the CP tuple ( CP::size-1 ->0)
|
||||
// pos : position in the CP tuple (CP::size-1 ->0)
|
||||
// ip : position in the tuple of indices (for sl)
|
||||
// MP : accumulation of the final type metacomputed.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user