From fecd860a3bf80ec3b47a1e092d56069daa369f56 Mon Sep 17 00:00:00 2001 From: Robin Davies Date: Tue, 3 Sep 2024 05:31:55 -0400 Subject: [PATCH] No build of profilePlugin on Github action servers. --- src/CMakeLists.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 13df939..7e58950 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,13 @@ set(CXX_STANDARD 20) include(FindPkgConfig) + +if(DEFINED ENV{GITHUB_ACTIONS}) + message(STATUS "Building in GitHub Actions environment") + set(GITHUB_ACTIONS TRUE) +else() + set(GITHUB_ACTIONS FALSE) +endif() ################################################################# # ENABLE/DISABLE VST3 Support. # Disabled, pending approval of Steinberg VST3 License. @@ -310,14 +317,17 @@ target_link_libraries(pipedaltest PRIVATE PiPedalCommon) target_include_directories(pipedaltest PRIVATE ${PIPEDAL_INCLUDES} ) -add_executable(profilePlugin - profilePluginMain.cpp - ) -target_link_libraries(profilePlugin PRIVATE profiler ${PIPEDAL_LIBS}) +if (NOT GITHUB_ACTIONS) # Google perftools are not available on Github action servers. -target_include_directories(profilePlugin PRIVATE ${PIPEDAL_INCLUDES} - ) + add_executable(profilePlugin + profilePluginMain.cpp + ) + target_link_libraries(profilePlugin PRIVATE profiler ${PIPEDAL_LIBS}) + + target_include_directories(profilePlugin PRIVATE ${PIPEDAL_INCLUDES} + ) +endif() add_executable(jsonTest testMain.cpp jsonTest.cpp