Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bastien Legoy
ensimag-malloc
Commits
fda6cf55
Commit
fda6cf55
authored
Jan 05, 2022
by
Thomas Vincent
Browse files
Update solution with Cmake version used in school
parent
5506e9cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
CMakeLists.txt
CMakeLists.txt
+7
-4
No files found.
CMakeLists.txt
View file @
fda6cf55
...
...
@@ -48,10 +48,13 @@ endif(EXISTS /usr/src/gtest)
##
# Recherche du répertoire avec les headers python
##
find_package
(
Python COMPONENTS Development
)
if
(
Python_Development_FOUND
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-I
${
Python_INCLUDE_DIRS
}
"
)
endif
(
Python_Development_FOUND
)
execute_process
(
COMMAND pkg-config --cflags python3 OUTPUT_VARIABLE python_header OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
python_header
}
"
)
# You can use this solution when cmake is updated to 3.12
#find_package(Python3 COMPONENTS Development)
#if (Python_Development_FOUND)
# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -I${Python_INCLUDE_DIRS}")
#endif (Python_Development_FOUND)
##
# Si vous utilisé plusieurs fichiers, en plus de mem.c et les autres,
...
...
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