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 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

cmake #15

wants to merge 1 commit into from

Conversation

yboumenir
Copy link

No description provided.

Copy link

@usagi usagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm a user of cmdline with CMake.

I think, those source file and executables are test project. Then, I'd suggest use CTest for it. see: https://cmake.org/Wiki/CMake/Testing_With_CTest

And, this pull-requested CMakeLists.txt is not useful for CMake users. Because, cmdline is header-only library project, therefore we need the below cmake install command:

install( FILES cmdline.h DESTINATION include )

Would you please include my suggests.


@tanakh I use the library with CMake ExternalProject. But, In currently, we need a little trciks:

ExternalProject_Add( external_cmdline
  GIT_REPOSITORY [email protected]:tanakh/cmdline.git
  PREFIX            ${CMAKE_CURRENT_BINARY_DIR}/external
  # trick-1: empty configure directive
  CONFIGURE_COMMAND ""
  # trick-2: empty build directive
  BUILD_COMMAND     ""
  # trick-3: custom install command
  INSTALL_COMMAND
    COMMAND ${CMAKE_COMMAND}
      -E copy_if_different
        ${CMAKE_CURRENT_BINARY_DIR}/external/src/external_cmdline/cmdline.h
        ${CMAKE_CURRENT_BINARY_DIR}/include/cmdline.h
)

It's helpful to CMake users if you merge and add supporting CMake with this proposes.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants