diff --git a/CMakeLists.txt b/CMakeLists.txt index 790764a..f306c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,19 @@ target_include_directories(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTER ${Boost_INCLUDE_DIRS}) target_link_libraries(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} INTERFACE - crypto3::all + crypto3::block + crypto3::codec + crypto3::containers + crypto3::multiprecision + crypto3::algebra + crypto3::math + crypto3::zk + crypto3::hash + crypto3::random + crypto3::marshalling-zk + crypto3::marshalling-algebra + crypto3::marshalling-core + crypto3::marshalling-multiprecision ${Boost_LIBRARIES}) cm_deploy(TARGETS ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} @@ -53,4 +65,6 @@ cm_deploy(TARGETS ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME} NAMESPACE ${CMAKE_WORKSPACE_NAME}::) include(CMTest) + cm_add_test_subdirectory(test) + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0912119..60fc7b7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -38,6 +38,12 @@ macro(define_transpiler_test name) ) add_dependencies(compile_and_run_transpiler_tests transpiler_${name}_test_run) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(transpiler_${name}_test PRIVATE "-fconstexpr-steps=2147483647") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(transpiler_${name}_test PRIVATE "-fconstexpr-ops-limit=4294967295") + endif() + endmacro() set(TESTS_NAMES diff --git a/test/transpiler.cpp b/test/transpiler.cpp index d0683f9..d083dc7 100644 --- a/test/transpiler.cpp +++ b/test/transpiler.cpp @@ -40,7 +40,6 @@ #include #include #include - #include #include #include @@ -51,6 +50,8 @@ #include #include +#include + #include #include #include @@ -65,7 +66,6 @@ #include #include #include - #include #include @@ -103,7 +103,7 @@ inline std::vector generate_random_step_list(const std::size_t r, c // ******************************************************************************* // * Randomness setup -// *******************************************************************************/ +// ******************************************************************************* using dist_type = std::uniform_int_distribution; std::size_t test_global_seed = 0; boost::random::mt11213b test_global_rnd_engine;