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

[Bug] #1926

Open
1 task done
Riya54671 opened this issue Oct 2, 2024 · 0 comments
Open
1 task done

[Bug] #1926

Riya54671 opened this issue Oct 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Riya54671
Copy link

Operating System

Windows

What's the issue you encountered?

1)Condition on CMAKE_GENERATOR: The logic in if (IMHEX_IDE_HELPERS_OVERRIDE_XCODE_COMPILER AND CMAKE_GENERATOR STREQUAL "Xcode") might fail if the generator is defined but not set to Xcode initially. It's also fragile because changing the generator temporarily to Unknown and back may cause unforeseen issues.
2}returnIfTargetIsNonTweakable macro: The logic using get_target_property might return empty or unset variables, causing errors in conditions and return() should be safely invoked in case properties are missing.
3)Recursive call _tweakTargetsRecursive:Recursive calls using file(RELATIVE_PATH) might result in unexpected behavior if directory structures change or are inconsistent and the condition if(${dir} STREQUAL ${CMAKE_SOURCE_DIR}) might cause issues if ${dir} or ${CMAKE_SOURCE_DIR} aren't evaluated properly.
4)Handling INCLUDE_DIRECTORIES and GLOB_RECURSE:The use of file(GLOB_RECURSE targetPrivateHeaders CONFIGURE_DEPENDS could result in performance degradation and unexpected behavior since CMake discourages the use of GLOB for adding files to the build system.
5)Unconditional setting of CMAKE_XCODE_GENERATE_SCHEME:This option should not always be set to YES, as it may interfere with user-defined CMake options or existing build settings.

How can the issue be reproduced?

The following issues can be resolved by

  1. Use CMake's internal mechanism to manage compiler settings for Xcode rather than tricking CMake. Removing this workaround is advisable if possible. If sticking with this hacky method, consider guarding it more carefully.
    2)Add default return conditions to ensure properties are valid.
    3)Ensure the directory variables are always valid, and use a safer method to compare directories.
    4)Prefer explicitly listing header files or writing a function to scan and add them as needed.
    5)Wrap the set(CMAKE_XCODE_GENERATE_SCHEME YES) in a conditional or let users override it.

ImHex Version

X.X.X

ImHex Build Type

  • Nightly or built from sources

Installation type

Portable

Additional context?

No response

@Riya54671 Riya54671 added the bug Something isn't working label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant