From b28cb54ced3c0f9fb39f9951f3624357c141fe59 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:44:50 -0500 Subject: [PATCH] Rename demo/test options to CPPTRACE_BUILD_TESTING --- CMakeLists.txt | 4 +--- README.md | 3 +-- cmake/OptionVariables.cmake | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94c5b15..49fd919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -443,7 +443,7 @@ endif() # =============================================== Demo/test =============================================== -if(CPPTRACE_BUILD_TEST) +if(CPPTRACE_BUILD_TESTING) add_executable(test test/test.cpp) target_compile_features(test PRIVATE cxx_std_11) target_link_libraries(test PRIVATE ${target_name}) @@ -462,9 +462,7 @@ if(CPPTRACE_BUILD_TEST) COMMAND dsymutil $ ) endif() -endif() -if(CPPTRACE_BUILD_DEMO) add_executable(demo test/demo.cpp) target_compile_features(demo PRIVATE cxx_std_11) target_link_libraries(demo PRIVATE ${target_name}) diff --git a/README.md b/README.md index 984715a..ff62c20 100644 --- a/README.md +++ b/README.md @@ -662,8 +662,7 @@ Other useful configurations: - `CPPTRACE_USE_EXTERNAL_LIBDWARF=On/Off`: Get libdwarf from `find_package` rather than `FetchContent`. Testing: -- `CPPTRACE_BUILD_TEST` Build a small test program -- `CPPTRACE_BUILD_DEMO` Build a small demo program +- `CPPTRACE_BUILD_TESTING` Build small demo and test program - `CPPTRACE_BUILD_TEST_RDYNAMIC` Use `-rdynamic` when compiling the test program ## Testing Methodology diff --git a/cmake/OptionVariables.cmake b/cmake/OptionVariables.cmake index 5bb6d80..ad9ce03 100644 --- a/cmake/OptionVariables.cmake +++ b/cmake/OptionVariables.cmake @@ -150,12 +150,10 @@ option(CPPTRACE_ADDR2LINE_SEARCH_SYSTEM_PATH "" OFF) # ---- Other configurations ---- if(PROJECT_IS_TOP_LEVEL) - option(CPPTRACE_BUILD_TEST "" OFF) - option(CPPTRACE_BUILD_DEMO "" OFF) + option(CPPTRACE_BUILD_TESTING "" OFF) option(CPPTRACE_BUILD_TEST_RDYNAMIC "" OFF) mark_as_advanced( - CPPTRACE_BUILD_TEST - CPPTRACE_BUILD_DEMO + CPPTRACE_BUILD_TESTING CPPTRACE_BUILD_TEST_RDYNAMIC ) endif()