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 Error in recent commits #7994

Closed
dsgibbons opened this issue Jun 7, 2023 · 5 comments
Closed

CMake Error in recent commits #7994

dsgibbons opened this issue Jun 7, 2023 · 5 comments
Labels

Comments

@dsgibbons
Copy link

When running cmake -G "Unix Makefiles", I get the following error with recent commits.

-- Proceeding with version: 23.5.9.23
-- CMAKE_CXX_FLAGS: 
CMake Error at CMakeLists.txt:559 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "LINKER_LANGUAGE" is not allowed.


CMake Error at CMakeLists.txt:512 (target_sources):
  target_sources may only be set INTERFACE properties on INTERFACE targets
Call Stack (most recent call first):
  CMakeLists.txt:561 (compile_schema_for_samples)


-- Configuring incomplete, errors occurred!

This error was introduced with commit 17b9eed and was consistent for both of the following setups:

  • Ubuntu 18.04 + cmake 3.10.2
  • Ubuntu 20.04 + cmake 3.16.3

The error disappears as soon as I checkout the previous commit that affects CMakeLists.txt: cbc8872

@mikeholler
Copy link
Contributor

I'm also seeing this. Any workaround?

@mikeholler
Copy link
Contributor

I can confirm that 22.04 works, but I would like to see this work with 18.04 and 20.04 given that they're LTS releases.

@wirepair
Copy link

For Ubuntu 20.04 LTS I just changed https://github.com/google/flatbuffers/blob/v23.5.26/CMakeLists.txt#L557 to:

  add_library(flatsample STATIC)

and it compiled fine with cmake -G "Unix Makefiles" ../ && make -j8 && sudo make install.

In my project which uses flatbuffers as a dependency, I had to do the following (which I found from some other repositories CMakeLists.txt):

FetchContent_Declare(
  flatbuffers
  GIT_REPOSITORY https://github.com/google/flatbuffers.git
  GIT_TAG v23.5.26
)
FetchContent_GetProperties(flatbuffers)
if (NOT flatbuffers_POPULATED)
    FetchContent_Populate(flatbuffers)
    add_library(flatbuffers INTERFACE)
    add_library(flatbuffers::flatbuffers ALIAS flatbuffers)
    target_include_directories(flatbuffers INTERFACE ${flatbuffers_SOURCE_DIR}/include)
endif()
# Adds flatbuffers

fuhlig1 added a commit to fuhlig1/FairSoft that referenced this issue Aug 31, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
fuhlig1 added a commit to fuhlig1/FairSoft that referenced this issue Aug 31, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
fuhlig1 added a commit to fuhlig1/FairSoft that referenced this issue Aug 31, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
dennisklein pushed a commit to dennisklein/FairSoft that referenced this issue Sep 12, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
fliiiix added a commit to fliiiix/flatbuffers that referenced this issue Nov 22, 2023
Adresses all these issues ->
google#7994
google#7979
google#8049

Fix 7994, Fix 7979, Fix 8049
dbaileychess added a commit that referenced this issue Nov 23, 2023
Adresses all these issues ->
#7994
#7979
#8049

Fix 7994, Fix 7979, Fix 8049

Co-authored-by: Derek Bailey <derekbailey@google.com>
dennisklein pushed a commit to dennisklein/FairSoft that referenced this issue Dec 18, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
dennisklein pushed a commit to dennisklein/FairSoft that referenced this issue Dec 18, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
dennisklein pushed a commit to FairRootGroup/FairSoft that referenced this issue Dec 19, 2023
There is a known cmake error for some operating systems.
google/flatbuffers#7994
candysonya pushed a commit to candysonya/flatbuffers that referenced this issue Jan 8, 2024
Adresses all these issues ->
google#7994
google#7979
google#8049

Fix 7994, Fix 7979, Fix 8049

Co-authored-by: Derek Bailey <derekbailey@google.com>
Copy link

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Jan 20, 2024
Copy link

github-actions bot commented Feb 4, 2024

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants