Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Release folder creation on Windows environment. #297

Closed
Dhruva21 opened this issue Oct 27, 2023 · 2 comments · Fixed by #301
Closed

Issue with Release folder creation on Windows environment. #297

Dhruva21 opened this issue Oct 27, 2023 · 2 comments · Fixed by #301
Assignees

Comments

@Dhruva21
Copy link
Contributor

I built the spdm-emu code on windows environment. Used cmake to select the target as Debug or Release.
Steps followed for the build process:

  1. mkdir build
  2. cd build
  3. cmake -DARCH=x64 -DTOOLCHAIN=CLANG -DTARGET=<Debug|Release> -DCRYPTO=mbedtls ..
  4. msbuild spdm_emu.sln (added visual studio path to environment variable)

In step no.3, when I selected target as Debug mode, Debug folder is created and all the executables are generated successfully. But I found the issue when the target is selected as Release. Even though the target is Release, Debug folder is generated.

For temporary workaround, I made modifications in the top level cmake file. I removed debug libraries that are set.

@jyao1
Copy link
Member

jyao1 commented Nov 6, 2023

@Dhruva21 , could you help do some analysis and fix the issue?

I just use command line and does not use sln. Not sure what is the problem.

@Dhruva21
Copy link
Contributor Author

Dhruva21 commented Nov 9, 2023

@jyao1, after some analysis and study I figured out in the step 4 of the build process I was following, by default msbuild.exe generates the debug folder. So I had to additionally pass the property flag inorder to generate Release folder.
4. for debug folder: msbuild spdm_emu.sln
4. for release folder: msbuild spdm_emu.sln /property:Configuration=Release
Anyhow, I observed the debug libraries is included irrespective of the build type.
image

So I modified the cmake_c_standard_libraries based on cmake_build_type.
image
Can you review this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants