Skip to content

Commit

Permalink
add PCH for faster compile
Browse files Browse the repository at this point in the history
  • Loading branch information
marty1885 committed Jan 22, 2023
1 parent 1fd9a85 commit 1670b1a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,2 +1,3 @@
build/
.vscode
.vscode
.cache
4 changes: 4 additions & 0 deletions Etaler/CMakeLists.txt
Expand Up @@ -27,6 +27,10 @@ else()
target_link_libraries(Etaler tbb)
endif()

if(${CMAKE_VERSION} VERSION_GREATER "3.15")
target_precompile_headers(Etaler PRIVATE pch.hpp)
endif()

if(ETALER_ENABLE_OPENCL)
target_sources(Etaler PRIVATE Backends/OpenCLBackend.cpp)

Expand Down
11 changes: 11 additions & 0 deletions Etaler/pch.hpp
@@ -0,0 +1,11 @@
#pragma once

#ifdef __cplusplus
#include <vector>
#include <string>
#include <cstdint>

#include "Core/SmallVector.hpp"
#include "Core/Tensor.hpp"

#endif

0 comments on commit 1670b1a

Please sign in to comment.