You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when using the BUILD_HEADERS_ONLY option, cmake fails
To Reproduce
Steps to reproduce the behavior:
Open './cmake/StandardSettings.cmake'
Go to option 'option(${PROJECT_NAME}_BUILD_HEADERS_ONLY "Build the project as a header-only library." ON)'
Modify OFF --> ON
MAKE SURE TO DEFINE THE add FUNCTION IN ./include/project/temp.hpp
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
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)
The text was updated successfully, but these errors were encountered:
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?
Describe the bug
when using the BUILD_HEADERS_ONLY option, cmake fails
To Reproduce
Steps to reproduce the behavior:
add
FUNCTION IN./include/project/temp.hpp
Expected behavior
Generation should work without any error.
Screenshots
Desktop:
Suggested Fix
In
./CMakeLists.txt
line 89 AddS
toLIST
change
foreach(header IN LIST headers)
toforeach(header IN LISTS headers)
The text was updated successfully, but these errors were encountered: