Skip to content

Commit

Permalink
Silly flipped logic yet again
Browse files Browse the repository at this point in the history
One day, I'll learn not to do this.
  • Loading branch information
dwd committed Jul 18, 2024
1 parent 1b551f3 commit b2faa76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ target_include_directories(rapidxml-test
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
if (${RAPIDXML_PERF_TESTS})
if (RAPIDXML_PERF_TESTS)
message("Running performance tests")
file(DOWNLOAD https://www.w3.org/TR/xml/REC-xml-20081126.xml ${CMAKE_CURRENT_BINARY_DIR}/REC-xml-20081126.xml)
target_compile_definitions(rapidxml-test PRIVATE RAPIDXML_TESTING=1 RAPIDXML_PERF_TESTS=1)
else()
message("Will skip performance tests")
target_compile_definitions(rapidxml-test PRIVATE RAPIDXML_TESTING=1)
endif()

Expand Down
4 changes: 2 additions & 2 deletions test/perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
const auto xml_sample_file = "REC-xml-20081126.xml";

#ifdef RAPIDXML_PERF_TESTS
#define PERF_TEST() GTEST_SKIP() << "Skipping performance test"
#else
#define PERF_TEST() (void)0
#else
#define PERF_TEST() GTEST_SKIP() << "Skipping performance test"
#endif

TEST(Perf, Parse) {
Expand Down

0 comments on commit b2faa76

Please sign in to comment.