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

CMake can't generate Xcode project. #2791

Closed
hyoklee opened this issue Apr 21, 2023 · 9 comments
Closed

CMake can't generate Xcode project. #2791

hyoklee opened this issue Apr 21, 2023 · 9 comments
Assignees
Labels
Component - Build CMake, Autotools Merge - To 1.14 This needs to be merged to HDF5 1.14 Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Milestone

Comments

@hyoklee
Copy link
Member

hyoklee commented Apr 21, 2023

Describe the bug

  1. git clone repo
  2. mkdir build && cd build && cmake -G Xcode ..
-- Found Perl: /usr/bin/perl (found version "5.30.3") 
CMake Error at CMakeLists.txt:614 (if):
  if given arguments:

    "MATCHES" "Debug" "OR" "MATCHES" "Developer"

  Unknown arguments specified


-- Configuring incomplete, errors occurred!
See also "/Users/hyoklee/src/hdf5.HDFGroup/build/CMakeFiles/CMakeOutput.log".
See also "/Users/hyoklee/src/hdf5.HDFGroup/build/CMakeFiles/CMakeError.log".

Expected behavior

Create Xcode project.

Platform (please complete the following information)

  • HDF5 version: develop def21b1
  • OS and version: Darwin nene.ad.hdfgroup.org 21.6.0 Darwin Kernel Version 21.6.0: Thu Mar 9 20:08:59 PST 2023; root:xnu-8020.240.18.700.8~1/RELEASE_X86_64 x86_64
  • Compiler and version: AppleClang 14.0.0.14000029
  • Build system (e.g. CMake, Autotools) and version: cmake version 3.25.2
@hyoklee
Copy link
Member Author

hyoklee commented Apr 21, 2023

If I run cmake -G Xcode -D HDF_CFG_NAME:STRING="Debug" ..,
I get 547 lines of these repeating messages:

CMake Error in src/CMakeLists.txt:
  The custom command generating

    /Users/hyoklee/src/hdf5/build/src/gen_SRCS.stamp1

  is attached to multiple targets:

    gen_hdf5-static
    gen_hdf5-shared

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".


CMake Error in examples/CMakeLists.txt:
  The custom command generating

    /Users/hyoklee/src/hdf5/build/src/gen_SRCS.stamp1

  is attached to multiple targets:

    gen_hdf5-static
    gen_hdf5-shared

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".

@byrnHDF
Copy link
Contributor

byrnHDF commented Apr 21, 2023

Use CMAKE_BUILD_TYPE

@hyoklee
Copy link
Member Author

hyoklee commented Apr 21, 2023

Can you make CMAKE_BUILD_TYPE not required?

@byrnHDF
Copy link
Contributor

byrnHDF commented Apr 21, 2023

No. CMake required.

@hyoklee
Copy link
Member Author

hyoklee commented Apr 21, 2023

How about this?

hyoklee@605adb8

@derobins
Copy link
Member

This is the same issue I tripped over on Windows when using the CMake GUI. @byrnHDF is working on a fix.

@derobins derobins added Merge - To 1.12 Merge - To 1.14 This needs to be merged to HDF5 1.14 Priority - 1. High 🔼 These are important issues that should be resolved in the next release Component - Build CMake, Autotools Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub labels Apr 30, 2023
@derobins derobins changed the title [BUG] CMake can't generate Xcode project. CMake can't generate Xcode project. May 3, 2023
@byrnHDF
Copy link
Contributor

byrnHDF commented May 4, 2023

This should be fixed for both windows and xcode, if someone can verify.

@hyoklee
Copy link
Member Author

hyoklee commented May 4, 2023

@derobins derobins added this to the 1.14.4 milestone Oct 9, 2023
@derobins
Copy link
Member

derobins commented Nov 6, 2023

This is no longer a problem as of 1.14.3

@derobins derobins closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Build CMake, Autotools Merge - To 1.14 This needs to be merged to HDF5 1.14 Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Projects
None yet
Development

No branches or pull requests

3 participants