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

Not printing the header files with BUILD_HEADERS_ONLY [BUG] #39

Open
mk-95 opened this issue Apr 10, 2022 · 2 comments
Open

Not printing the header files with BUILD_HEADERS_ONLY [BUG] #39

mk-95 opened this issue Apr 10, 2022 · 2 comments
Assignees
Labels
acknowledged The issue is being worked on bug Something isn't working

Comments

@mk-95
Copy link

mk-95 commented Apr 10, 2022

Describe the bug
when using the BUILD_HEADERS_ONLY option, cmake fails

To Reproduce
Steps to reproduce the behavior:

  1. Open './cmake/StandardSettings.cmake'
  2. Go to option 'option(${PROJECT_NAME}_BUILD_HEADERS_ONLY "Build the project as a header-only library." ON)'
  3. Modify OFF --> ON
  4. MAKE SURE TO DEFINE THE add FUNCTION IN ./include/project/temp.hpp
  5. Generate cmake to get the following:
-- Found the following headers:
CMake Error at CMakeLists.txt:89 (foreach):
  Unknown argument:

    LIST



-- * 
CMake Error at CMakeLists.txt:91 (endforeach):
  endforeach An ENDFOREACH command was found outside of a proper FOREACH
  ENDFOREACH structure.  Or its arguments did not match the opening FOREACH
  command.

Expected behavior
Generation should work without any error.

Screenshots
image

Desktop:

  • OS: MacOS Monterey
  • Version 12.1 (21C52)

Suggested Fix
In ./CMakeLists.txt line 89 Add S to LIST

change foreach(header IN LIST headers) to foreach(header IN LISTS headers)

@mk-95 mk-95 added the bug Something isn't working label Apr 10, 2022
@filipdutescu filipdutescu self-assigned this May 17, 2022
@filipdutescu filipdutescu added the acknowledged The issue is being worked on label May 17, 2022
@filipdutescu
Copy link
Owner

Hello, thanks for submitting this issue! I am not sure why this is happening as it should not have any problems with header only projects. Just to confirm, you added the .hpp file to the list of headers and sources used by CMake, right?

@mk-95
Copy link
Author

mk-95 commented May 18, 2022

Yes, I have added the .hpp file to the list of headers and sources in the CMake directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged The issue is being worked on bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants