Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: cache Default modules #109

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions cmake/build/Default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ Default to build.
]]
include_guard(GLOBAL)

# Create the compile command database for clang by default
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS
ON
CACHE BOOL "Generate compile_commands.json")

# Always build with -fPIC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_POSITION_INDEPENDENT_CODE
ON
CACHE BOOL "Always build position-independent code")

# This will cause all libraries to be built shared unless the library was
# explicitly added as a static library. This variable is often added to
# projects as an ``option()`` so that each user of a project can decide if they
# want to build the project using shared or static libraries.
set(BUILD_SHARED_LIBS OFF)
set(BUILD_SHARED_LIBS
OFF
CACHE
BOOL
"This will cause all libraries to be built shared unless the library was explicitly added as a static library.
This variable is often added to projects as an ``option()`` so that each user of a project can decide if they want
to build the project using shared or static libraries.")
15 changes: 9 additions & 6 deletions cmake/configure/Default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ Default to configuration.
]]
include_guard(GLOBAL)

# Put the include dirs which are in the source or build tree before all other
# include dirs, so the headers in the sources are preferred over the already
# installed ones since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
ON
CACHE
BOOL
"Put the include dirs which are in the source or build tree before all other include dirs, so the headers in the sources are preferred over the already installed ones since cmake 2.4.1"
)

# Open FetchContent fetching logs.
set(FETCHCONTENT_QUIET ON)
set(FETCHCONTENT_QUIET
ON
CACHE BOOL "Don't print messages about fetch operations.")
Loading