Tweaks for building with macOS 26#11605
Conversation
jmarrec
left a comment
There was a problem hiding this comment.
I don't really get why we have XCode specific stuff but maybe it's really needed?
I pushed a branch with only 2 changes that allows me to build on Apple Clang 21 (macOS 26.5 fully up to date)
https://github.com/NatLabRockies/EnergyPlus/compare/build_apple-clang-21?expand=1
| if(CMAKE_GENERATOR STREQUAL "Xcode") | ||
| target_compile_options(project_warnings INTERFACE -Wno-shorten-64-to-32) | ||
| endif() |
There was a problem hiding this comment.
I have tweaks locally to build on apple-clang 21, and I haven't needed to add this?
Also, is this really Xcode generator specific?
(I would have expected CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||
| add_executable(generate_embeddable_epJSON_schema embedded/generate_embeddable_epJSON_schema.cpp) | ||
| target_link_libraries(generate_embeddable_epJSON_schema PRIVATE project_options project_fp_options project_warnings fmt::fmt) | ||
| target_link_libraries(generate_embeddable_epJSON_schema PRIVATE project_options project_fp_options project_warnings fmt::fmt nlohmann_json) |
There was a problem hiding this comment.
Haven't needed that either
| #ifndef CLI11_HAS_CODECVT | ||
| #if defined(__APPLE__) && defined(__clang__) | ||
| #define CLI11_HAS_CODECVT 0 | ||
| #elif defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER) && __GNUC__ < 5 |
There was a problem hiding this comment.
I see what you're doing. This is better than my own
target_compile_options(project_warnings INTERFACE -Wno-deprecated-declarations) # wstring_convert deprecated in newer libc++
I wonder if it's better to have it inline in CLI11.hpp or if it should be in CMake via target_compile_definitions(xxx PRIVATE CLI11_HAS_CODECVT=0) (for targets energyplus and convertInputFormat). I guess inline is fine.
Pull request overview
Description of the purpose of this PR
Pull Request Author
Reviewer