Open carlocorradini opened 1 month ago
@OlivierLDff I've removed INCLUDE_HEADER_PATTERN "*.hpp"
from packageProject
because INTERFACE
library requires *.ipp
files.
Currently packageProject
does not support multiple INCLUDE_HEADER_PATTERN
and therefore there is no way to specify both .cpp
and .ipp
files.
Waiting issue https://github.com/TheLartians/PackageProject.cmake/issues/44 to be fixed
@OlivierLDff CI fails with CMake 3.14 on ubuntu-latest
.
However, specifying: cmake -DCMAKE_BUILD_TYPE="" -DCMAKE_INSTALL_PREFIX=build/output -DASIO_USE_CPM="" -DASIO_SEPARATE_COMPILATION="" -DASIO_DYN_LINK="" -DASIO_NO_DEPRECATED="" -DASIO_ENABLE_EXAMPLES=ON -DASIO_ENABLE_INSTALL=ON -B build -S .
on my systems (Windows and Ubuntu) works flawlessly. It looks like ASIO_LIBRARY_TYPE
is set to INTERFACE
but this is strange since both in my tests and logically should be STATIC
.
Any thoughts?
I guess if(NOT ASIO_SEPARATE_COMPILATION)
returns true when ASIO_SEPARATE_COMPILATION
is set to ""
.
You could add logs? or specify values for ASIO_SEPARATE_COMPILATION in the include
of the action?
This look like annoying CMake rules to debug
@OlivierLDff Do we really need a job that sets all options to ""
?
Does adding more code for checking ""
is worth it?
NOT ASIO_SEPARATE_COMPILATION
is TRUE
because ASIO_SEPARATE_COMPILATION
is ""
and is evaluated as a FALSE
value
@OlivierLDff Do we really need a job that sets all options to
""
? Does adding more code for checking""
is worth it?
NOT ASIO_SEPARATE_COMPILATION
isTRUE
becauseASIO_SEPARATE_COMPILATION
is""
and is evaluated as aFALSE
value
No no additional code should be added, to me the problem is in the workflow file, that is buggy. Value should either be ON or OFF for all options, also don't wrap in ""
the matrix options. So add a default value in the include
of the action
@OlivierLDff The problem is https://github.com/OlivierLDff/asio.cmake/blob/194137dd7300616ff1a3d65f43e57255bf751126/.github/workflows/main.yml#L27
This does not set any option (all are ""
), what values (as default) to you prefer? STATIC library?
Yes include all parameters to the default values, this is the easiest I guess
@OlivierLDff Fixed! 🥳
Part of PR #17
It's now possible to build different library types.
SHARED
,STATIC
(default), orINTERFACE
.CMake options:
ASIO_SEPARATE_COMPILATION
Uses separately compiled source code for Asio's implementation Default:ON
ASIO_DYN_LINK
Uses separately compiled source code for Asio's implementation, with symbols exported for inclusion as part of a shared library Available only ifASIO_SEPARATE_COMPILATION
isON
Default:OFF
Flow pseudocode: