File tree Expand file tree Collapse file tree 6 files changed +40
-7
lines changed
Expand file tree Collapse file tree 6 files changed +40
-7
lines changed Original file line number Diff line number Diff line change 2727 run : |
2828 sudo apt-get update
2929 sudo apt-get install libxml2-utils
30- sudo apt-get install z3 libz3-dev
30+ sudo apt-get install libz3-dev libtinyxml2 -dev
3131 sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qt5-default
3232
3333 - name : Fix missing z3_version.h
4545 python -m pip install pip --upgrade
4646 python -m pip install pytest
4747
48+ - name : CMake build on ubuntu (with GUI / system tinyxml2)
49+ if : contains(matrix.os, 'ubuntu')
50+ run : |
51+ mkdir cmake.output.tinyxml2
52+ cd cmake.output.tinyxml2
53+ cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off ..
54+ cmake --build . -- -j$(nproc)
55+ cd ..
56+
57+ - name : Run CMake test (system tinyxml2)
58+ if : contains(matrix.os, 'ubuntu')
59+ run : |
60+ cmake --build cmake.output.tinyxml2 --target check -- -j$(nproc)
61+
4862 - name : CMake build on ubuntu (with GUI)
4963 if : contains(matrix.os, 'ubuntu')
5064 run : |
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND)
3535 endif ()
3636endif ()
3737if (tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
38- target_link_libraries (cppcheck tinyxml2 )
38+ target_link_libraries (cppcheck ${tinyxml2_LIBRARY} )
3939endif ()
4040
4141add_dependencies (cppcheck copy_cfg )
Original file line number Diff line number Diff line change 11qt5_wrap_cpp (test -benchmark-simple_SRC benchmarksimple.h )
22add_custom_target (build -testbenchmark-simple-deps SOURCES ${test-benchmark-simple_SRC} )
33add_dependencies (gui-build-deps build -testbenchmark-simple-deps )
4+ if (USE_BUNDLED_TINYXML2)
5+ list (APPEND test-benchmark-simple_SRC $<TARGET_OBJECTS :tinyxml2_objs >)
6+ endif ()
47add_executable (benchmark-simple
58 ${test-benchmark-simple_SRC}
69 benchmarksimple.cpp
710 $<TARGET_OBJECTS :lib_objs >
8- $<TARGET_OBJECTS :tinyxml2_objs >
911 $<TARGET_OBJECTS :simplecpp_objs >
1012 )
1113target_include_directories (benchmark-simple PRIVATE ${CMAKE_SOURCE_DIR} /lib )
@@ -16,4 +18,7 @@ if (HAVE_RULES)
1618endif ()
1719if (USE_Z3)
1820 target_link_libraries (benchmark-simple ${Z3_LIBRARIES} )
21+ endif ()
22+ if (tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
23+ target_link_libraries (benchmark-simple ${tinyxml2_LIBRARY} )
1924endif ()
Original file line number Diff line number Diff line change @@ -22,4 +22,7 @@ if (HAVE_RULES)
2222endif ()
2323if (USE_Z3)
2424 target_link_libraries (test -xmlreportv2 ${Z3_LIBRARIES} )
25+ endif ()
26+ if (tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
27+ target_link_libraries (test -xmlreportv2 ${tinyxml2_LIBRARY} )
2528endif ()
Original file line number Diff line number Diff line change 11if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
2- add_executable (fuzz-client EXCLUDE_FROM_ALL
2+ set (fuzz-client_SRC
33 main.cpp
44 type2.cpp
5+ )
6+ if (USE_BUNDLED_TINYXML2)
7+ list (APPEND fuzz-client_SRC $<TARGET_OBJECTS :tinyxml2_objs >)
8+ endif ()
9+ add_executable (fuzz-client EXCLUDE_FROM_ALL
10+ ${fuzz-client_SRC}
511 $<TARGET_OBJECTS :simplecpp_objs >
6- $<TARGET_OBJECTS :tinyxml2_objs >
712 $<TARGET_OBJECTS :lib_objs >)
8- target_include_directories (fuzz-client PRIVATE ${CMAKE_SOURCE_DIR} /lib ${CMAKE_SOURCE_DIR} /externals/simplecpp ${CMAKE_SOURCE_DIR} /externals/tinyxml2 ${CMAKE_SOURCE_DIR} /externals )
13+ target_include_directories (fuzz-client PRIVATE ${CMAKE_SOURCE_DIR} /lib ${CMAKE_SOURCE_DIR} /externals/simplecpp ${CMAKE_SOURCE_DIR} /externals )
14+ if (USE_BUNDLED_TINYXML2)
15+ target_include_directories (fuzz-client PRIVATE ${CMAKE_SOURCE_DIR} /externals/tinyxml2/ )
16+ endif ()
917 target_compile_options (fuzz-client PRIVATE -fsanitize=fuzzer )
1018 # TODO: target_link_options() requires CMake >= 3.13
1119 #target_link_options(fuzz-client PRIVATE -fsanitize=fuzzer)
@@ -16,6 +24,9 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1624 if (USE_Z3)
1725 target_link_libraries (fuzz-client PRIVATE ${Z3_LIBRARIES} )
1826 endif ()
27+ if (tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
28+ target_link_libraries (fuzz-client PRIVATE tinyxml2 )
29+ endif ()
1930
2031 add_executable (translate EXCLUDE_FROM_ALL
2132 translate.cpp
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ if (BUILD_TESTS)
2626 endif ()
2727 endif ()
2828 if (tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
29- target_link_libraries (testrunner tinyxml2 )
29+ target_link_libraries (testrunner ${tinyxml2_LIBRARY} )
3030 endif ()
3131
3232 if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
You can’t perform that action at this time.
0 commit comments