Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
04e25bd4
Commit
04e25bd4
authored
11 months ago
by
Felix Weiglhofer
Browse files
Options
Downloads
Patches
Plain Diff
cmake: Fixes for online standalone build.
parent
a12ee31f
No related branches found
No related tags found
1 merge request
!1784
cmake: Fixes for online standalone build.
Pipeline
#29149
passed
11 months ago
Stage: build
Stage: package
Stage: verify
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/CMakeLists.txt
+7
-6
7 additions, 6 deletions
algo/CMakeLists.txt
external/InstallFlesnet.cmake
+1
-1
1 addition, 1 deletion
external/InstallFlesnet.cmake
external/InstallYamlCpp.cmake
+10
-9
10 additions, 9 deletions
external/InstallYamlCpp.cmake
with
18 additions
and
16 deletions
algo/CMakeLists.txt
+
7
−
6
View file @
04e25bd4
cmake_minimum_required
(
VERSION 3.14.0 FATAL_ERROR
)
cmake_policy
(
VERSION 3.14...3.23
)
if
(
CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR
)
set
(
CBM_ONLINE_STANDALONE ON
)
project
(
CbmOnline
)
else
()
set
(
CBM_ONLINE_STANDALONE OFF
)
if
(
NOT DEFINED CBM_ONLINE_STANDALONE
)
if
(
CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR
)
set
(
CBM_ONLINE_STANDALONE ON
)
project
(
CbmOnline
)
else
()
set
(
CBM_ONLINE_STANDALONE OFF
)
endif
()
endif
()
if
(
CBM_ONLINE_STANDALONE
)
...
...
@@ -46,7 +48,6 @@ if (CBM_ONLINE_STANDALONE)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
list
(
PREPEND CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake/modules"
)
include
(
CbmMacros
)
# for 'download_project_if_needed', 'Gen_Exe_Script' macro
include
(
../external/InstallGtest.cmake
)
add_subdirectory
(
../external external
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
external/InstallFlesnet.cmake
+
1
−
1
View file @
04e25bd4
...
...
@@ -7,7 +7,7 @@ set(FLESNET_VERSION cdc7893481aa10d51070d965ae9fc6eebfe91ac2) # 2024-01-23
set
(
FLESNET_SRC_URL
"https://github.com/cbm-fles/flesnet"
)
set
(
FLESNET_DESTDIR
"
${
PROJEC
T_BINARY_DIR
}
/
external/
flesnet-prefix"
)
set
(
FLESNET_DESTDIR
"
${
CMAKE_CURREN
T_BINARY_DIR
}
/flesnet-prefix"
)
set
(
FLESNET_BIN_PREFIX
"
${
FLESNET_DESTDIR
}
/src/flesnet-build"
)
download_project_if_needed
(
...
...
This diff is collapsed.
Click to expand it.
external/InstallYamlCpp.cmake
+
10
−
9
View file @
04e25bd4
set
(
YAMLCPP_VERSION 0579ae3d976091d7d664aa9d2527e0d0cff25763
)
# version 0.7.0
set
(
YAMLCPP_SRC_URL
"https://github.com/jbeder/yaml-cpp"
)
set
(
YAMLCPP_DESTDIR
"
${
CMAKE_BINARY_DIR
}
/external/YAMLCPP-prefix"
)
#set(YAMLCPP_BYPRODUCT "${PROJECT_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}yaml-cpp${CMAKE_SHARED_LIBRARY_SUFFIX}")
set
(
YAMLCPP_SRC_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/yaml-cpp"
)
set
(
YAMLCPP_INCLUDE_DIR
"
${
YAMLCPP_SRC_DIR
}
/include"
)
set
(
YAMLCPP_DESTDIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
/yaml-cpp-prefix"
)
set
(
YAMLCPP_BYPRODUCT
"
${
YAMLCPP_DESTDIR
}
/src/yaml-cpp-build/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
yaml-cpp
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
"
)
download_project_if_needed
(
PROJECT yaml-cpp
GIT_REPOSITORY
${
YAMLCPP_SRC_URL
}
GIT_TAG
${
YAMLCPP_VERSION
}
SOURCE_DIR
${
CMAKE_CURRENT_SOU
RC
E
_DIR
}
/yaml-cpp
SOURCE_DIR
${
YAMLCPP_S
RC_DIR
}
TEST_FILE CMakeLists.txt
)
...
...
@@ -25,7 +26,7 @@ endif()
ExternalProject_Add
(
yaml-cpp
SOURCE_DIR
${
CMAKE_CURRENT_SOU
RC
E
_DIR
}
/yaml-cpp
SOURCE_DIR
${
YAMLCPP_S
RC_DIR
}
GIT_CONFIG advice.detachedHead=false
BUILD_IN_SOURCE 0
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
...
...
@@ -35,16 +36,16 @@ ExternalProject_Add(
-DYAML_BUILD_SHARED_LIBS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
BUILD_COMMAND
${
YAMLCPP_BUILD_COMMAND
}
yaml-cpp
BUILD_BYPRODUCTS
${
PROJECT_BINARY_DIR
}
/external/yaml-cpp-prefix/src/yaml-cpp-build/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
yaml-cpp
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
BUILD_BYPRODUCTS
${
YAMLCPP_BYPRODUCT
}
INSTALL_COMMAND
""
)
# pre-create empty directory to make INTERFACE_INCLUDE_DIRECTORIES happy
file
(
MAKE_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/external/yaml-cpp/include
)
file
(
MAKE_DIRECTORY
${
YAMLCPP_INCLUDE_DIR
}
)
add_library
(
external::yaml-cpp STATIC IMPORTED GLOBAL
)
add_dependencies
(
external::yaml-cpp yaml-cpp
)
set_target_properties
(
external::yaml-cpp PROPERTIES
IMPORTED_LOCATION
${
PROJECT_BINARY_DIR
}
/external/yaml-cpp-prefix/src/yaml-cpp-build/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
yaml-cpp
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
INTERFACE_INCLUDE_DIRECTORIES
${
CMAKE_SOURCE_DIR
}
/external/yaml-cpp/include
IMPORTED_LOCATION
${
YAMLCPP_BYPRODUCT
}
INTERFACE_INCLUDE_DIRECTORIES
${
YAMLCPP_INCLUDE_DIR
}
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment