-
Notifications
You must be signed in to change notification settings - Fork 40
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: Can't generate iOS project, unless iOS target exist for every single project. #605
Comments
Just got a report that a similar thing happens in CLion on Linux, even if you're missing the "Code::Blocks (Linux)" target. (for some reason the "Linux Makefile" target is not enough...) |
Let's first see what is doable in a single-project context. A developer calls
I prefer the third option (which is the current behavior), because it guarantees that the developer gets what they asked for. If they want to build for a given exporter and their project doesn't support that exporter, it just doesn't work at all. Feel free to convince me otherwise though. Now, getting back to a multi-project context, I can think of 2 solutions:
[1]: @@ -2044,5 +2044,4 @@ function(jucer_project_end)
if(NOT current_exporter IN_LIST JUCER_PROJECT_EXPORT_TARGETS)
- message(FATAL_ERROR "You must call jucer_export_target(\"${current_exporter}\")"
- " before calling jucer_project_end()."
- )
+ # Can't do anything
+ return()
endif() [2]: @@ -2044,5 +2044,6 @@ function(jucer_project_end)
if(NOT current_exporter IN_LIST JUCER_PROJECT_EXPORT_TARGETS)
- message(FATAL_ERROR "You must call jucer_export_target(\"${current_exporter}\")"
- " before calling jucer_project_end()."
+ message(WARNING "You didn't call jucer_export_target(\"${current_exporter}\")"
+ " for project \"${JUCER_PROJECT_NAME}\", so no targets will be added."
)
+ return()
endif() |
Unfortunately using another exporter is not a good solution for CLion, using any other exporter that isn’t the default one makes code completion/refactoring and other features broken... I’m on the latest CLion BTW, same as the user who reported the Linux issue. |
As for iOS - it currently breaks the configure step when you do have some targets that are iOS friendly, but some that don’t. So I’d rather if in this case it would create a project with no targets which is valid - especially when you have sub projects that are valid under the same cmakelists.txt file. |
I guess you mean "CMake generator" instead of "exporter". If CLion cannot properly handle another CMake generator, though JetBrains claims so since CLion 2019.3, then it's a bug in CLion. That's not something FRUT should have to deal with. |
It is a bug in CLion, but I don’t think FRUT should be tied with a particular type of cmake generator in order to build correctly, that defeats the purpose of Cmake in my opinion. |
Seems like if you try to generate an iOS project from a top level CMakeLists that contain multiple projects, it only works if all projects under that directory contain an iOS target.
I think it would be better if those projects are simply not added to the target list, so that one could still build the projects that do support that in a multi-project context.
The text was updated successfully, but these errors were encountered: