You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmake control of CMAKE_BUILD_TYPE when using mbedtls in other projects #3789
I suggest a simple patch - basically only do the lines when the project is the top project
$ git diff HEAD^
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5af4c8124..27590ef08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,9 +112,12 @@ option: \n\
endif()
endif()
-set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
- CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull"
- FORCE)
+# If this is the root project add longer list of available CMAKE_BUILD_TYPE values
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
+ CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull"
+ FORCE)
+endif()
# Create a symbolic link from ${base_name} in the binary directory
# to the corresponding path in the source directory.
Description
Type: Bug
Priority: Minor
Bug
OS
All
mbed TLS build:
Version: git commit id 72ca397
branch: development
Enhancement\Feature Request
Justification - why does the library need this feature?
Integration to other projects also running cmake. The current code traverses the CMAKE_BUILD_TYPE to the mother project, which can be anything - thus clearly problematic.
Suggested enhancement
With the patch the code will let the project using mbedtls control the build types
Thanx @paul-elliott-arm I have it ready - tried to push to feature/cmake-not-top but got
ERROR: Permission to ARMmbed/mbedtls.git denied to peter-toft-greve.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Activity
paul-elliott-arm commentedon Oct 14, 2020
Could you potentially submit this as a pull request?
peter-toft-greve commentedon Oct 14, 2020
Thanx @paul-elliott-arm I have it ready - tried to push to feature/cmake-not-top but got
The same snippet can be found at https://pastebin.pl/view/raw/8ff3dcd6
gilles-peskine-arm commentedon Oct 14, 2020
@peter-toft-greve Please fork the repository on GitHub, push the branch to your forked repository, and then open a pull request from that branch.
Note that the commit message needs a signoff line indicating that you have the right to submit the patch.
peter-toft-greve commentedon Oct 14, 2020
Like this @paul-elliott-arm and @gilles-peskine-arm
#3790
?
tom-cosgrove-arm commentedon Jan 27, 2023
Fixed by #3790 (which said "Solves: #3789" rather than "Resolves:", hence why this wasn't closed automatically