Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aidge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Girard-Satabin
aidge
Commits
41e0f1b4
Commit
41e0f1b4
authored
1 year ago
by
Vincent Templier
Browse files
Options
Downloads
Patches
Plain Diff
Add BUILD_CORE_ALONE mode to compile Core library
parent
10d8ec4c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aidge/_Core/CMakeLists.txt
+29
-6
29 additions, 6 deletions
aidge/_Core/CMakeLists.txt
aidge/_Core/Makefile
+34
-1
34 additions, 1 deletion
aidge/_Core/Makefile
aidge/_Core/README.md
+28
-0
28 additions, 0 deletions
aidge/_Core/README.md
with
91 additions
and
7 deletions
aidge/_Core/CMakeLists.txt
+
29
−
6
View file @
41e0f1b4
# project(Aidge_Core)
if
(
BUILD_CORE_ALONE
)
project
(
Aidge_Core
)
cmake_minimum_required
(
VERSION 3.11
)
add_compile_options
(
-Wall -Wextra -fPIC
)
endif
()
if
(
PYBIND
)
if
(
PYBIND
)
generate_python_binding
(
aidge_core core
)
Include
(
FetchContent
)
FetchContent_Declare
(
PyBind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.10.4
# or a later release
)
FetchContent_MakeAvailable
(
PyBind11
)
file
(
GLOB_RECURSE pybind_src_files
"python_binding/*.cpp"
)
pybind11_add_module
(
aidge_core MODULE
${
pybind_src_files
}
"NO_EXTRAS"
)
target_include_directories
(
aidge_core PUBLIC
${
pybind11_INCLUDE_DIRS
}
"python_binding"
)
target_link_libraries
(
aidge_core PUBLIC core
)
# generate_python_binding(aidge_core core)
endif
()
endif
()
add_library
(
core STATIC
)
add_library
(
core STATIC
)
...
@@ -21,8 +38,14 @@ if (PYBIND)
...
@@ -21,8 +38,14 @@ if (PYBIND)
target_link_libraries
(
core PRIVATE
${
PYTHON_LIBRARIES
}
)
target_link_libraries
(
core PRIVATE
${
PYTHON_LIBRARIES
}
)
endif
()
endif
()
if
(
NOT BUILD_CORE_ALONE
)
# Activate compile time reducer for aidge_core
set_target_properties
(
core PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE
)
# set_target_properties(n2d2_cpu_lib PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "include/utils/Precompiled.hpp")
cotire
(
core
)
endif
()
# Activate compile time reducer for aidge_core
if
(
TESTS
)
set_target_properties
(
core PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE
)
add_subdirectory
(
tests
)
# set_target_properties(n2d2_cpu_lib PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "include/utils/Precompiled.hpp")
endif
()
cotire
(
core
)
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
aidge/_Core/Makefile
+
34
−
1
View file @
41e0f1b4
# This makefile does nothing but delegating the actual building to cmake
# This makefile does nothing but delegating the actual building to cmake
BUILDDIR
:=
build
BUILDDIR
:=
build
MAKEFLAGS
:=
--no-print-directory
MAKEFLAGS
:=
--no-print-directory
\ No newline at end of file
all
:
core_with_pybind
core_only
:
mkdir
-p
${
BUILDDIR
};
\
cd
${
BUILDDIR
};
\
cmake
-DBUILD_CORE_ALONE
=
ON
-DCMAKE_BUILD_TYPE
=
Release
-DPYBIND
=
OFF
-DTESTS
=
OFF ..
;
\
${
MAKE
}
${
MAKEFLAGS
};
core_tests
:
mkdir
-p
${
BUILDDIR
};
\
cd
${
BUILDDIR
};
\
cmake
-DBUILD_CORE_ALONE
=
ON
-DCMAKE_BUILD_TYPE
=
Debug
-DPYBIND
=
OFF
-DTESTS
=
ON ..
;
\
${
MAKE
}
${
MAKEFLAGS
};
\
cd
tests
;
\
ctest
--output-on-failure
||
true
;
core_with_pybind
:
mkdir
-p
${
BUILDDIR
};
\
cd
${
BUILDDIR
};
\
cmake
-DBUILD_CORE_ALONE
=
ON
-DCMAKE_BUILD_TYPE
=
Release
-DPYBIND
=
ON
-DTESTS
=
OFF ..
;
\
${
MAKE
}
${
MAKEFLAGS
};
core_with_pybind_tests
:
mkdir
-p
${
BUILDDIR
};
\
cd
${
BUILDDIR
};
\
cmake
-DBUILD_CORE_ALONE
=
ON
-DCMAKE_BUILD_TYPE
=
Debug
-DPYBIND
=
ON
-DTESTS
=
ON ..
;
\
${
MAKE
}
${
MAKEFLAGS
};
\
cd
tests
;
\
ctest
--output-on-failure
||
true
;
clean
:
if
[
-d
"
${
BUILDDIR
}
"
]
;
then
rm
-rf
${
BUILDDIR
};
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
aidge/_Core/README.md
+
28
−
0
View file @
41e0f1b4
# Aidge Core library
You can find here the C++ code of the Core library of Aidge.
## Compilation
To only compile the Core library, run
```
make core_only
```
To compile the Core library + the associated unitary tests, run
```
make core_tests
```
To compile the Core library with the python binding, run
```
make core_with_pybind
```
Important: this command can also be run with
`make`
.
To compile the Core library with the python binding + the associated unitary tests, run
```
make core_with_pybind_tests
```
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