Skip to content

Commit f37f975

Browse files
committed
[cmake] format fixes
1 parent e0fd7bf commit f37f975

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

CMakeLists.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,15 @@ else()
459459
endif()
460460

461461
ginkgo_generate_ginkgo_hpp()
462-
configure_file(${Ginkgo_SOURCE_DIR}/include/ginkgo/config.hpp.in
463-
${Ginkgo_BINARY_DIR}/include/ginkgo/config.hpp @ONLY)
464-
configure_file(${Ginkgo_SOURCE_DIR}/include/ginkgo/extensions/kokkos/config.hpp.in
465-
${Ginkgo_BINARY_DIR}/include/ginkgo/extensions/kokkos/config.hpp
466-
@ONLY
462+
configure_file(
463+
${Ginkgo_SOURCE_DIR}/include/ginkgo/config.hpp.in
464+
${Ginkgo_BINARY_DIR}/include/ginkgo/config.hpp
465+
@ONLY
466+
)
467+
configure_file(
468+
${Ginkgo_SOURCE_DIR}/include/ginkgo/extensions/kokkos/config.hpp.in
469+
${Ginkgo_BINARY_DIR}/include/ginkgo/extensions/kokkos/config.hpp
470+
@ONLY
467471
)
468472

469473
# Ginkgo core libraries

cmake/generate_ginkgo_hpp.cmake

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
function(ginkgo_generate_ginkgo_hpp)
2-
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${Ginkgo_SOURCE_DIR}/include/ginkgo/*.hpp")
2+
file(
3+
GLOB_RECURSE headers
4+
CONFIGURE_DEPENDS
5+
"${Ginkgo_SOURCE_DIR}/include/ginkgo/*.hpp"
6+
)
37
set(GKO_PUBLIC_HEADER_CONTENTS)
48
foreach(file IN LISTS headers)
59
file(RELATIVE_PATH file "${Ginkgo_SOURCE_DIR}/include" "${file}")
610
# just making sure it uses / path separators
711
file(TO_CMAKE_PATH file "${file}")
8-
if((file MATCHES "^ginkgo/extensions/.*$") OR
9-
(file MATCHES "^ginkgo/core/stop/residual_norm_reduction.hpp$") OR
10-
(file MATCHES "^ginkgo/core/solver/.*_trs.hpp$"))
11-
continue()
12+
if(
13+
(file MATCHES "^ginkgo/extensions/.*$")
14+
OR (file MATCHES "^ginkgo/core/stop/residual_norm_reduction.hpp$")
15+
OR (file MATCHES "^ginkgo/core/solver/.*_trs.hpp$")
16+
)
17+
continue()
1218
endif()
13-
set(GKO_PUBLIC_HEADER_CONTENTS "${GKO_PUBLIC_HEADER_CONTENTS}#include <${file}>\n")
19+
set(GKO_PUBLIC_HEADER_CONTENTS
20+
"${GKO_PUBLIC_HEADER_CONTENTS}#include <${file}>\n"
21+
)
1422
endforeach()
15-
configure_file("${Ginkgo_SOURCE_DIR}/include/ginkgo/ginkgo.hpp.in"
16-
"${Ginkgo_BINARY_DIR}/include/ginkgo/ginkgo.hpp" @ONLY)
23+
configure_file(
24+
"${Ginkgo_SOURCE_DIR}/include/ginkgo/ginkgo.hpp.in"
25+
"${Ginkgo_BINARY_DIR}/include/ginkgo/ginkgo.hpp"
26+
@ONLY
27+
)
1728
if(EXISTS "${Ginkgo_SOURCE_DIR}/include/ginkgo/ginkgo.hpp")
18-
message(FATAL_ERROR "ginkgo.hpp is auto-generated and should not be in include/ginkgo")
29+
message(
30+
FATAL_ERROR
31+
"ginkgo.hpp is auto-generated and should not be in include/ginkgo"
32+
)
1933
endif()
2034
endfunction()

0 commit comments

Comments
 (0)