From de55456d5d42ebbbe3358b6d770161e41569d60d Mon Sep 17 00:00:00 2001 From: Nathan Miller Date: Mon, 13 May 2024 12:38:55 -0700 Subject: [PATCH] re-enable PCH and CCACHE in CI builds until I can fix protobuf export/header include issue when they are disabled --- CMakeLists.txt | 4 ++-- OdbDesignLib/CMakeLists.txt | 4 ++-- OdbDesignServer/CMakeLists.txt | 4 ++-- OdbDesignTests/CMakeLists.txt | 4 ++-- OdbDesignTests/ProtobufSerializationTests.cpp | 4 ++-- Utils/CMakeLists.txt | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c02bf69c..ca12b8dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,9 +12,9 @@ set(CMAKE_CXX_STANDARD ${MY_CXX_STANDARD}) set(CMAKE_CXX_STANDARD_REQUIRED True) # only use ccache locally, i.e. not in CI -if (NOT DEFINED ENV{CI}) +#if (NOT DEFINED ENV{CI}) set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXE}") -endif() +#endif() # # GoogleTest support diff --git a/OdbDesignLib/CMakeLists.txt b/OdbDesignLib/CMakeLists.txt index 46171254..df0f1127 100644 --- a/OdbDesignLib/CMakeLists.txt +++ b/OdbDesignLib/CMakeLists.txt @@ -56,10 +56,10 @@ target_include_directories(OdbDesign $) # PCH -if (NOT DEFINED ENV{CI}) +#if (NOT DEFINED ENV{CI}) file (GLOB_RECURSE ODBDESIGN_HEADER_FILES "*.h") target_precompile_headers(OdbDesign PRIVATE ${ODBDESIGN_HEADER_FILES}) -endif() +#endif() # link to zlib (required for Crow HTTP compression) find_package(ZLIB REQUIRED) diff --git a/OdbDesignServer/CMakeLists.txt b/OdbDesignServer/CMakeLists.txt index 74295c97..596ee93f 100644 --- a/OdbDesignServer/CMakeLists.txt +++ b/OdbDesignServer/CMakeLists.txt @@ -4,10 +4,10 @@ add_executable(OdbDesignServer "main.cpp" "Controllers/HelloWorldController.h" "Controllers/HelloWorldController.cpp" "OdbDesignServerApp.h" "OdbDesignServerApp.cpp" "OdbDesignServer.h" "Controllers/FileUploadController.h" "Controllers/FileUploadController.cpp" "Controllers/FileModelController.h" "Controllers/FileModelController.cpp" "Controllers/HealthCheckController.h" "Controllers/HealthCheckController.cpp" "Controllers/DesignsController.h" "Controllers/DesignsController.cpp") ## PCH -if (NOT DEFINED ENV{CI}) +#if (NOT DEFINED ENV{CI}) file (GLOB_RECURSE ODBDESIGN_SERVER_HEADER_FILES "*.h") target_precompile_headers(OdbDesignServer PRIVATE ${ODBDESIGN_SERVER_HEADER_FILES}) -endif() +#endif() # link to OdbDesign library target_link_libraries(OdbDesignServer PRIVATE OdbDesign) diff --git a/OdbDesignTests/CMakeLists.txt b/OdbDesignTests/CMakeLists.txt index 14db579b..2e296fc5 100644 --- a/OdbDesignTests/CMakeLists.txt +++ b/OdbDesignTests/CMakeLists.txt @@ -21,7 +21,7 @@ include(GoogleTest) gtest_discover_tests(OdbDesignTests) ## PCH -if (NOT DEFINED ENV{CI}) +#if (NOT DEFINED ENV{CI}) file (GLOB_RECURSE OdbDesignTests_HEADER_FILES "*.h") target_precompile_headers(OdbDesignTests PRIVATE ${OdbDesignTests_HEADER_FILES}) -endif() \ No newline at end of file +#endif() \ No newline at end of file diff --git a/OdbDesignTests/ProtobufSerializationTests.cpp b/OdbDesignTests/ProtobufSerializationTests.cpp index 943d5076..02515b71 100644 --- a/OdbDesignTests/ProtobufSerializationTests.cpp +++ b/OdbDesignTests/ProtobufSerializationTests.cpp @@ -27,7 +27,7 @@ namespace Odb::Test auto pComponentMsg = pComponent->to_protobuf(); ASSERT_THAT(pComponentMsg, NotNull()); - auto pComponentFromMsg = std::unique_ptr(Component::MakeEmpty()); + auto pComponentFromMsg = std::unique_ptr(); pComponentFromMsg->from_protobuf(*pComponentMsg); ASSERT_EQ(pComponent->GetRefDes(), pComponentFromMsg->GetRefDes()); @@ -82,7 +82,7 @@ namespace Odb::Test auto pComponentMsg = pComponent->to_protobuf(); ASSERT_THAT(pComponentMsg, NotNull()); - auto pComponentFromMsg = std::unique_ptr(Component::MakeEmpty()); + auto pComponentFromMsg = std::unique_ptr(); pComponentFromMsg->from_protobuf(*pComponentMsg); ASSERT_EQ(pComponent->GetRefDes(), pComponentFromMsg->GetRefDes()); diff --git a/Utils/CMakeLists.txt b/Utils/CMakeLists.txt index 6d38928c..148dff8d 100644 --- a/Utils/CMakeLists.txt +++ b/Utils/CMakeLists.txt @@ -11,10 +11,10 @@ target_include_directories(Utils $) ## PCH -if (NOT DEFINED ENV{CI}) +#if (NOT DEFINED ENV{CI}) file (GLOB_RECURSE UTILS_HEADER_FILES "*.h") target_precompile_headers(Utils PRIVATE ${UTILS_HEADER_FILES}) -endif() +#endif() # Link to LibArchive find_package(LibArchive REQUIRED)