File tree 8 files changed +22
-307
lines changed
8 files changed +22
-307
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ git config user.name "ginkgo-bot"
14
14
15
15
# save scripts from develop
16
16
cp .clang-format .pre-commit-config.yaml /tmp
17
- cp dev_tools/scripts/update_ginkgo_header.sh /tmp
18
17
19
18
# checkout current PR head
20
19
LOCAL_BRANCH=format-tmp-$HEAD_BRANCH
@@ -23,7 +22,6 @@ git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH
23
22
# restore files from develop
24
23
cp /tmp/.clang-format .
25
24
cp /tmp/.pre-commit-config.yaml .
26
- cp /tmp/update_ginkgo_header.sh dev_tools/scripts/
27
25
28
26
# make base pre-commit config available
29
27
git add .pre-commit-config.yaml
Original file line number Diff line number Diff line change @@ -30,10 +30,3 @@ repos:
30
30
examples/external-lib-interfacing/external-lib-interfacing.cpp|
31
31
core/base/workspace_aliases.hpp
32
32
)$
33
- - id : update-ginkgo-header
34
- name : update ginkgo header
35
- entry : dev_tools/scripts/update_ginkgo_header.sh
36
- language : script
37
- types : [header]
38
- pass_filenames : false
39
- files : ^include/ginkgo/core
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ include(cmake/build_type_helpers.cmake)
123
123
include (cmake/build_helpers.cmake)
124
124
include (cmake/install_helpers.cmake)
125
125
include (cmake/compiler_features.cmake)
126
+ include (cmake/generate_ginkgo_hpp.cmake)
126
127
127
128
if (MSVC )
128
129
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
@@ -322,6 +323,7 @@ else()
322
323
set (GINKGO_DPCPP_MAJOR_VERSION "0" )
323
324
set (GINKGO_DPCPP_MINOR_VERSION "0" )
324
325
endif ()
326
+ ginkgo_generate_ginkgo_hpp()
325
327
configure_file (${Ginkgo_SOURCE_DIR} /include /ginkgo/config.hpp.in
326
328
${Ginkgo_BINARY_DIR} /include /ginkgo/config.hpp @ONLY)
327
329
configure_file (${Ginkgo_SOURCE_DIR} /include /ginkgo/extensions/kokkos/config.hpp.in
@@ -401,16 +403,6 @@ if(GINKGO_DEVEL_TOOLS)
401
403
VERBATIM )
402
404
endif ()
403
405
404
- # MacOS needs to install bash, gnu-sed, findutils and coreutils
405
- # format_header needs clang-format 6.0.0+
406
- find_program (BASH bash)
407
- if (NOT "${BASH} " STREQUAL "BASH-NOTFOUND" AND GINKGO_DEVEL_TOOLS)
408
- add_custom_target (generate_ginkgo_header ALL
409
- COMMAND ${Ginkgo_SOURCE_DIR} /dev_tools/scripts/update_ginkgo_header.sh
410
- WORKING_DIRECTORY ${Ginkgo_SOURCE_DIR} )
411
- endif ()
412
- unset (BASH CACHE )
413
-
414
406
415
407
# Installation
416
408
include (cmake/information_helpers.cmake)
Original file line number Diff line number Diff line change
1
+ function (ginkgo_generate_ginkgo_hpp)
2
+ file (GLOB_RECURSE headers CONFIGURE_DEPENDS ${Ginkgo_SOURCE_DIR} /include /ginkgo/*.hpp)
3
+ set (GKO_PUBLIC_HEADER_CONTENTS)
4
+ foreach (file IN LISTS headers)
5
+ file (RELATIVE_PATH file ${Ginkgo_SOURCE_DIR} /include "${file} " )
6
+ # just making sure it uses / path separators
7
+ 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
+ endif ()
13
+ set (GKO_PUBLIC_HEADER_CONTENTS "${GKO_PUBLIC_HEADER_CONTENTS} #include <${file} >\n " )
14
+ endforeach ()
15
+ configure_file (${Ginkgo_SOURCE_DIR} /include /ginkgo/ginkgo.hpp.in
16
+ ${Ginkgo_BINARY_DIR} /include /ginkgo/ginkgo.hpp @ONLY)
17
+ endfunction ()
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ function(ginkgo_doc_gen name in pdf mainpage-in)
54
54
)
55
55
list (APPEND doxygen_base_input
56
56
${PROJECT_BINARY_DIR} /include /ginkgo/config.hpp
57
+ ${PROJECT_BINARY_DIR} /include /ginkgo/ginkgo.hpp
57
58
${DIR_BASE} /include
58
59
${MAINPAGE}
59
60
)
@@ -79,6 +80,7 @@ function(ginkgo_doc_gen name in pdf mainpage-in)
79
80
)
80
81
list (APPEND doxygen_depend
81
82
${PROJECT_BINARY_DIR} /include /ginkgo/config.hpp
83
+ ${PROJECT_BINARY_DIR} /include /ginkgo/ginkgo.hpp
82
84
)
83
85
if (GINKGO_DOC_GENERATE_EXAMPLES)
84
86
list (APPEND doxygen_depend
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
8
8
9
9
#include <ginkgo/config.hpp>
10
- #PUBLIC_HEADER_PLACE_HOLDER
11
-
10
+ @GKO_PUBLIC_HEADER_CONTENTS@
12
11
13
12
#endif // GKO_GINKGO_HPP_
You can’t perform that action at this time.
0 commit comments