Skip to content

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

Open
@mk-95

Description

@mk-95

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)

Metadata

Metadata

Assignees

Labels

acknowledgedThe issue is being worked onbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions