File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 74
74
- name : Configure CMake
75
75
run : cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_DDSIM_TESTS=ON -T "ClangCl"
76
76
- name : Build
77
- run : cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --parallel 8
77
+ run : cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
78
78
- name : Test
79
79
working-directory : ${{github.workspace}}/build/test
80
80
run : cd $BUILD_TYPE && ./ddsim_test
Original file line number Diff line number Diff line change @@ -40,10 +40,25 @@ add_custom_command(TARGET ${PROJECT_NAME}_test
40
40
COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_DIR:${PROJECT_NAME} _test>/circuits ${CMAKE_BINARY_DIR} /circuits
41
41
COMMENT "Copying circuits and creating symlinks for ${PROJECT_NAME} _test"
42
42
VERBATIM )
43
+
44
+
43
45
44
- add_executable (ddsim_benchmark ${CMAKE_CURRENT_SOURCE_DIR} /benchmark.cpp)
46
+ if (NOT TARGET benchmark::benchmark)
47
+ set (THREADS_PREFER_PTHREAD_FLAG ON )
48
+ find_package (Threads REQUIRED)
49
+ set (BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Skip google benchmark self tests" )
50
+ add_subdirectory ("${PROJECT_SOURCE_DIR} /extern/qfr/extern/dd_package/extern/benchmark" "extern/qfr/extern/dd_package/extern/benchmark" EXCLUDE_FROM_ALL )
51
+ set_target_properties (benchmark benchmark_main PROPERTIES FOLDER extern/qfr/extern/dd_package/extern)
52
+ if (BINDINGS)
53
+ # adjust visibility settings for building Python bindings
54
+ target_compile_options (benchmark PUBLIC -fvisibility=hidden)
55
+ endif ()
56
+ endif ()
57
+
58
+ add_executable (ddsim_benchmark EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR} /benchmark.cpp)
45
59
target_link_libraries (ddsim_benchmark PRIVATE ${PROJECT_NAME} benchmark::benchmark_main)
46
60
set_target_properties (ddsim_benchmark PROPERTIES EXPORT_NAME ddsim_benchmark)
61
+ set_target_properties (ddsim_benchmark PROPERTIES FOLDER tests CMAKE_CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF )
47
62
48
63
add_custom_command (TARGET ${PROJECT_NAME} _benchmark
49
64
POST_BUILD
You can’t perform that action at this time.
0 commit comments