Skip to content

Commit

Permalink
re-enable PCH and CCACHE in CI builds until I can fix protobuf export…
Browse files Browse the repository at this point in the history
…/header include issue when they are disabled
  • Loading branch information
nam20485 committed May 13, 2024
1 parent 497117e commit de55456
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions OdbDesignLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ target_include_directories(OdbDesign
$<INSTALL_INTERFACE:include>)

# 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)
Expand Down
4 changes: 2 additions & 2 deletions OdbDesignServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions OdbDesignTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
#endif()
4 changes: 2 additions & 2 deletions OdbDesignTests/ProtobufSerializationTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Odb::Test
auto pComponentMsg = pComponent->to_protobuf();
ASSERT_THAT(pComponentMsg, NotNull());

auto pComponentFromMsg = std::unique_ptr<Component>(Component::MakeEmpty());
auto pComponentFromMsg = std::unique_ptr<Component>();
pComponentFromMsg->from_protobuf(*pComponentMsg);

ASSERT_EQ(pComponent->GetRefDes(), pComponentFromMsg->GetRefDes());
Expand Down Expand Up @@ -82,7 +82,7 @@ namespace Odb::Test
auto pComponentMsg = pComponent->to_protobuf();
ASSERT_THAT(pComponentMsg, NotNull());

auto pComponentFromMsg = std::unique_ptr<Component>(Component::MakeEmpty());
auto pComponentFromMsg = std::unique_ptr<Component>();
pComponentFromMsg->from_protobuf(*pComponentMsg);

ASSERT_EQ(pComponent->GetRefDes(), pComponentFromMsg->GetRefDes());
Expand Down
4 changes: 2 additions & 2 deletions Utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ target_include_directories(Utils
$<INSTALL_INTERFACE:include>)

## 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)
Expand Down

0 comments on commit de55456

Please sign in to comment.