Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
6e78e697
Unverified
Commit
6e78e697
authored
May 03, 2024
by
James Lamb
Committed by
GitHub
May 03, 2024
Browse files
[c++] remove uses of '..' in headers (#6409)
parent
9f5fbb64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
CMakeLists.txt
CMakeLists.txt
+19
-1
build-cran-package.sh
build-cran-package.sh
+3
-13
include/LightGBM/utils/common.h
include/LightGBM/utils/common.h
+2
-2
No files found.
CMakeLists.txt
View file @
6e78e697
...
@@ -114,6 +114,12 @@ include_directories(${EIGEN_DIR})
...
@@ -114,6 +114,12 @@ include_directories(${EIGEN_DIR})
add_definitions
(
-DEIGEN_MPL2_ONLY
)
add_definitions
(
-DEIGEN_MPL2_ONLY
)
add_definitions
(
-DEIGEN_DONT_PARALLELIZE
)
add_definitions
(
-DEIGEN_DONT_PARALLELIZE
)
set
(
FAST_DOUBLE_PARSER_INCLUDE_DIR
"
${
PROJECT_SOURCE_DIR
}
/external_libs/fast_double_parser/include"
)
include_directories
(
${
FAST_DOUBLE_PARSER_INCLUDE_DIR
}
)
set
(
FMT_INCLUDE_DIR
"
${
PROJECT_SOURCE_DIR
}
/external_libs/fmt/include"
)
include_directories
(
${
FMT_INCLUDE_DIR
}
)
if
(
__BUILD_FOR_R
)
if
(
__BUILD_FOR_R
)
find_package
(
LibR REQUIRED
)
find_package
(
LibR REQUIRED
)
message
(
STATUS
"LIBR_EXECUTABLE:
${
LIBR_EXECUTABLE
}
"
)
message
(
STATUS
"LIBR_EXECUTABLE:
${
LIBR_EXECUTABLE
}
"
)
...
@@ -702,5 +708,17 @@ install(
...
@@ -702,5 +708,17 @@ install(
)
)
if
(
INSTALL_HEADERS
)
if
(
INSTALL_HEADERS
)
install
(
DIRECTORY
${
LightGBM_HEADER_DIR
}
/LightGBM DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/include
)
install
(
DIRECTORY
${
LightGBM_HEADER_DIR
}
/LightGBM
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/include
)
install
(
FILES
${
FAST_DOUBLE_PARSER_INCLUDE_DIR
}
/fast_double_parser.h
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/include/LightGBM/utils
)
install
(
DIRECTORY
${
FMT_INCLUDE_DIR
}
/
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/include/LightGBM/utils
FILES_MATCHING PATTERN
"*.h"
)
endif
()
endif
()
build-cran-package.sh
View file @
6e78e697
...
@@ -76,12 +76,12 @@ fi
...
@@ -76,12 +76,12 @@ fi
cp
\
cp
\
external_libs/fast_double_parser/include/fast_double_parser.h
\
external_libs/fast_double_parser/include/fast_double_parser.h
\
"
${
TEMP_R_DIR
}
/src/include/LightGBM"
"
${
TEMP_R_DIR
}
/src/include/LightGBM
/utils
"
mkdir
-p
"
${
TEMP_R_DIR
}
/src/include/LightGBM/fmt"
mkdir
-p
"
${
TEMP_R_DIR
}
/src/include/LightGBM/
utils/
fmt"
cp
\
cp
\
external_libs/fmt/include/fmt/
*
.h
\
external_libs/fmt/include/fmt/
*
.h
\
"
${
TEMP_R_DIR
}
/src/include/LightGBM/fmt
/
"
"
${
TEMP_R_DIR
}
/src/include/LightGBM/
utils/
fmt"
# including only specific files from Eigen, to keep the R package
# including only specific files from Eigen, to keep the R package
# small and avoid redistributing code with licenses incompatible with
# small and avoid redistributing code with licenses incompatible with
...
@@ -155,16 +155,6 @@ cd "${TEMP_R_DIR}"
...
@@ -155,16 +155,6 @@ cd "${TEMP_R_DIR}"
done
done
find
.
-name
'*.h.bak'
-o
-name
'*.hpp.bak'
-o
-name
'*.cpp.bak'
-exec
rm
{}
\;
find
.
-name
'*.h.bak'
-o
-name
'*.hpp.bak'
-o
-name
'*.cpp.bak'
-exec
rm
{}
\;
sed
\
-i
.bak
\
-e
's/\.\..*fmt\/format\.h/LightGBM\/fmt\/format\.h/'
\
src/include/LightGBM/utils/common.h
sed
\
-i
.bak
\
-e
's/\.\..*fast_double_parser\.h/LightGBM\/fast_double_parser\.h/'
\
src/include/LightGBM/utils/common.h
# 'processx' is listed as a 'Suggests' dependency in DESCRIPTION
# 'processx' is listed as a 'Suggests' dependency in DESCRIPTION
# because it is used in install.libs.R, a file that is not
# because it is used in install.libs.R, a file that is not
# included in the CRAN distribution of the package
# included in the CRAN distribution of the package
...
...
include/LightGBM/utils/common.h
View file @
6e78e697
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
#include <vector>
#include <vector>
#define FMT_HEADER_ONLY
#define FMT_HEADER_ONLY
#include "
../../../external_libs/fast_double_parser/include/
fast_double_parser.h"
#include "fast_double_parser.h"
#include "
../../../external_libs/fmt/include/
fmt/format.h"
#include "fmt/format.h"
#ifdef _MSC_VER
#ifdef _MSC_VER
#include <intrin.h>
#include <intrin.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment