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

add -DCMAKE_PROJECT_INCLUDE argument #480

Commits on Sep 10, 2022

  1. add -DCMAKE_PROJECT_INCLUDE argument to allow user injecting custom c…

    …ode into source subproject without modifying it's source code.
    
    for example, user may want to link static libraries, they can write following code to `project-after.cmake`
    ```
    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
    ```
    
    then pass `-DCMAKE_PROJECT_INCLUDE=project-after.cmake` to cmake command
    
    then project-after.cmake will be automatically run after `project()` command
    
    Reference: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_INCLUDE.html
    
    Signed-off-by: leleliu008 <leleliu008@gmail.com>
    leleliu008 committed Sep 10, 2022
    Configuration menu
    Copy the full SHA
    14ff0a8 View commit details
    Browse the repository at this point in the history