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

Compiling error on Windows when using CMake - if not MSVC compiler #2655

Open
mliutko opened this issue Oct 28, 2024 · 0 comments
Open

Compiling error on Windows when using CMake - if not MSVC compiler #2655

mliutko opened this issue Oct 28, 2024 · 0 comments

Comments

@mliutko
Copy link

mliutko commented Oct 28, 2024

Development Machine, OS, Compiler (and Other Relevant Toolchain Info)

Compiling by CMake on Windows 10 x64 using GCC 13.2.0

SDK Version (Please Give Commit SHA if Manually Compiling)

Latest Release (LTS_08_2024)

Protocol

N/A

Describe the Bug

If try to compile the project (which uses and depends on the azure-iot-sdk-c) on Windows but not by MSVC compiler (e.g. GCC) the next error is thrown on cmake --preset ..... command execution (does not matter Debug or Release):

CMake Error at IoTAzureClientLibC/azure-iot-sdk-c/configs/azure_iot_sdksFunctions.cmake:219 (if):
  if given arguments:
    "(" "Release" "STREQUAL" "Debug" ")" "AND" "(" "GREATER_EQUAL" "1930" ")"
  Unknown arguments specified
Call Stack (most recent call first):
  AveryIoTAzureClientLibC/azure-iot-sdk-c/provisioning_client/tests/CMakeLists.txt:8 (enable_address_sanitize)

Possible solution
For easiest fix of this error is enough to add an additional check condition for MSVC in azure-iot-sdk-c/configs/azure_iot_sdksFunctions.cmake file, e.g. replace at line 218 (currently) from if(WIN32) to if(WIN32 AND MSVC)

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

No branches or pull requests

1 participant