<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Problems during Cmake build integration]]></title>
		<link>https://www.wolfssl.com/forums/topic2319-problems-during-cmake-build-integration.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2319.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Problems during Cmake build integration.]]></description>
		<lastBuildDate>Tue, 24 Jun 2025 13:13:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problems during Cmake build integration]]></title>
			<link>https://www.wolfssl.com/forums/post8401.html#p8401</link>
			<description><![CDATA[<p>Excellent. I&#039;m glad to see you made progress and found your own solution.&nbsp; May I ask you about your project?&nbsp; Is this out of person, professional or academic interest? </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Tue, 24 Jun 2025 13:13:05 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8401.html#p8401</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problems during Cmake build integration]]></title>
			<link>https://www.wolfssl.com/forums/post8400.html#p8400</link>
			<description><![CDATA[<p>Thanks anthony for your reply and suggestion. After some further investigation, I seem to have misunderstood the preprocessor macro hint in the documentation [1]. The errors resolved when providing &quot;-DWOLFSSL_USER_SETTINGS=yes&quot; in the CMake configure step rather than compilation.</p>]]></description>
			<author><![CDATA[null@example.com (hannson)]]></author>
			<pubDate>Tue, 24 Jun 2025 07:12:03 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8400.html#p8400</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problems during Cmake build integration]]></title>
			<link>https://www.wolfssl.com/forums/post8348.html#p8348</link>
			<description><![CDATA[<p>Hi Hannson, </p><p>Thank you so much for all these details.&nbsp; I see on the commandl-ine you display you have -DNO_DSA and -DNO_PSK.&nbsp; So, that would be the cause of the redefinition.&nbsp; Perhaps the solution would be to remove NO_DSA and NO_PSK from your user_setting.sh.h file. </p><p>Might I ask if this is a commercial use case?&nbsp; If so, to preserve you privacy, I would suggest further interaction happen via our confidential technical support channel.&nbsp; You can send messages to support@wolfssl.com and we will support you there.&nbsp; Note that you can also send messages with attachments there.&nbsp; &nbsp;</p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Wed, 21 May 2025 16:11:19 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8348.html#p8348</guid>
		</item>
		<item>
			<title><![CDATA[Problems during Cmake build integration]]></title>
			<link>https://www.wolfssl.com/forums/post8345.html#p8345</link>
			<description><![CDATA[<p>Hi everyone,</p><p>first of all thanks for the extensive library - looks really promising and might be exactly suited for our usecase in the embedded space!</p><p>I understand that CMake isn&#039;t the primary build system for wolfSSL, however since it&#039;s the main build system generator together with make in our project, this would be my preferred integration into our existing infrastructure. I would like to have it both available to link against our cross-compiled NXP LPC microcontroller and for off-target unit testing in CI/CD pipelines or on development machines. We have rather minimal requirements, SHA and ECC is enough for our current needs but it&#039;s great to have a bigger set of features available if needed at some point.</p><p>I&#039;m struggling a bit at the moment to integrate it within CMake (wolfSSL Release 5.8.0; Apr 24, 2025). Following the INSTALL file in the repo and [1], I&#039;ve took an example user_settings template from the examples folder and reduced it to what I believe we would need to start. I created a simple wrapper CMakeLists.txt that lives outside of the wolfSSL sources and includes our project specific needs. When running the build, I get a bunch of redefine macro errors:</p><div class="codebox"><pre><code>cd .../build/test/test/lib/wolfssl/wolfssl &amp;&amp; /usr/sbin/cc -DBUILDING_WOLFSSL -DECC_SHAMIR -DECC_TIMING_RESISTANT -DGCM_TABLE_4BIT -DHAVE_AESGCM -DHAVE_CHACHA -DHAVE_CONFIG_H -DHAVE_DH_DEFAULT_PARAMS -DHAVE_ECC -DHAVE_ENCRYPT_THEN_MAC -DHAVE_EXTENDED_MASTER -DHAVE_FFDHE_2048 -DHAVE_HASHDRBG -DHAVE_HKDF -DHAVE_ONE_TIME_AUTH -DHAVE_POLY1305 -DHAVE_PTHREAD -DHAVE_SNI -DHAVE_SUPPORTED_CURVES -DHAVE_THREAD_LS -DHAVE_TLS_EXTENSIONS -DHAVE___UINT128_T -DNO_DES3 -DNO_DES3_TLS_SUITES -DNO_DSA -DNO_MD4 -DNO_PSK -DNO_RC4 -DTFM_ECC256 -DTFM_TIMING_RESISTANT -DWC_NO_ASYNC_THREADING -DWC_RSA_BLINDING -DWC_RSA_PSS -DWOLFSSL_BASE64_ENCODE -DWOLFSSL_IGNORE_FILE_WARN -DWOLFSSL_NO_SHAKE128 -DWOLFSSL_NO_SHAKE256 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_SHA224 -DWOLFSSL_SHA3 -DWOLFSSL_SHA384 -DWOLFSSL_SHA512 -DWOLFSSL_SYS_CA_CERTS -DWOLFSSL_TLS13 -DWOLFSSL_USER_SETTINGS -DWOLFSSL_USE_ALIGN -DWOLFSSL_X86_64_BUILD -I.../lib/wolfssl/wolfssl -I.../build/test/test/lib/wolfssl/wolfssl -I.../lib/wolfssl -Wall -Wextra -Wno-unused -Werror  -g -MD -MT lib/wolfssl/wolfssl/CMakeFiles/wolfssl.dir/wolfcrypt/src/sp_int.c.o -MF CMakeFiles/wolfssl.dir/wolfcrypt/src/sp_int.c.o.d -o CMakeFiles/wolfssl.dir/wolfcrypt/src/sp_int.c.o -c .../lib/wolfssl/wolfssl/wolfcrypt/src/sp_int.c
In file included from .../lib/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h:339,
                 from .../lib/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h:34,
                 from .../lib/wolfssl/wolfssl/wolfssl/wolfcrypt/libwolfssl_sources.h:46,
                 from .../lib/wolfssl/wolfssl/wolfcrypt/src/hmac.c:23:
.../lib/wolfssl/user_settings.h:527:9: error: &quot;NO_PSK&quot; redefined [-Werror]
  527 | #define NO_PSK
      |         ^~~~~~
&lt;command-line&gt;: note: this is the location of the previous definition
.../lib/wolfssl/user_settings.h:529:9: error: &quot;NO_DSA&quot; redefined [-Werror]
  529 | #define NO_DSA</code></pre></div><p>As the build errors occur already while compiling the wolfSSL library, I assume that my configuration might not be correct. I tried to search this forum and other sources for additional input but failed to resolve the issue on my own. Could you please provide some pointers or recommendations on what I might be missing? As I&#039;ve got an error uploading files to this post, both are provided via pastebin in [2] and [3] instead below.</p><p>Thanks in advance,<br />Johannes</p><p>[1] - <a href="https://www.wolfssl.com/how-do-i-manage-the-build-configuration-of-wolfssl/">https://www.wolfssl.com/how-do-i-manage … f-wolfssl/</a><br />[2] - <a href="https://pastebin.com/sADS3THb">https://pastebin.com/sADS3THb</a><br />[3] - <a href="https://pastebin.com/GC6JsJpU">https://pastebin.com/GC6JsJpU</a></p><br /><br /><br /><p>PS: Directory structure looks currently like this:</p><div class="codebox"><pre><code>.../lib/wolfssl % &gt;&gt; ls -lah
total 36K
drwxr-xr-x  3 dev dev 4.0K May 20 07:37 .
drwxr-xr-x 13 dev dev 4.0K May 14 08:43 ..
-rw-r--r--  1 dev dev  369 May 20 07:37 CMakeLists.txt
-rw-r--r--  1 dev dev  14K May 20 07:37 user_settings.h
drwxr-xr-x 29 dev dev 4.0K May 14 08:52 wolfssl
-rw-r--r--  1 dev dev  356 May 19 07:30 wolfssl.cmake</code></pre></div><p>The woflssl.cmake just pulls in the wolfssl project sources with FetchContent. The CMakeLists.txt is read during the configuration/build and included via the regular:</p><div class="codebox"><pre><code>target_link_libraries(${PROJECT_NAME} PRIVATE wolfssl)</code></pre></div><p>Tooling versions are:</p><div class="codebox"><pre><code>% &gt;&gt; gcc --version
gcc (GCC) 14.2.1 20240910
% &gt;&gt; cmake --version
cmake version 3.31.5
% &gt;&gt; make --version
GNU Make 4.4.1</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (hannson)]]></author>
			<pubDate>Tue, 20 May 2025 09:40:15 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8345.html#p8345</guid>
		</item>
	</channel>
</rss>
