Skip to content

Commit f672da6

Browse files
authored
Add CMake include_guard() directives to each *.cmake file (#683)
1 parent 2a74362 commit f672da6

File tree

13 files changed

+26
-0
lines changed

13 files changed

+26
-0
lines changed

cmake/configure.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
if(NOT CMAKE_BUILD_TYPE)
24
set(CMAKE_BUILD_TYPE "Release")
35
endif(NOT CMAKE_BUILD_TYPE)

cmake/functions.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# ——— Helper function to add & register tests —————————————————————————
2+
include_guard()
3+
24
function(ppc_add_test test_name test_src USE_FLAG)
35
if(${USE_FLAG})
46
add_executable(${test_name} "${PROJECT_SOURCE_DIR}/${test_src}")

cmake/gtest.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
include(ExternalProject)
24

35
ExternalProject_Add(

cmake/json.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
include(ExternalProject)
24

35
ExternalProject_Add(

cmake/libenvpp.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
include(ExternalProject)
24
ExternalProject_Add(
35
ppc_libenvpp

cmake/modes.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
add_compile_definitions(PPC_PATH_TO_PROJECT="${CMAKE_CURRENT_SOURCE_DIR}")
24

35
macro(SUBDIRLIST result curdir)

cmake/mpi.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
find_package(MPI REQUIRED COMPONENTS CXX)
24
if(NOT MPI_FOUND)
35
message(FATAL_ERROR "MPI NOT FOUND")

cmake/onetbb.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
include(ExternalProject)
24

35
option(ENABLE_SYSTEM_TBB "Use system TBB instead of bundled version" OFF)

cmake/openmp.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
if(MSVC AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
24
set(OpenMP_C_FLAGS
35
"/openmp:llvm"

cmake/sanitizers.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include_guard()
2+
13
option(ENABLE_ADDRESS_SANITIZER OFF)
24
option(ENABLE_UB_SANITIZER OFF)
35
option(ENABLE_LEAK_SANITIZER OFF)

0 commit comments

Comments
 (0)