certik / fastGPT

Fast GPT-2 inference written in Fortran
MIT License
180 stars 16 forks source link

Do not modify .gitignore automatically #29

Closed certik closed 1 year ago

certik commented 1 year ago

That way we do not have uncommitted git changes just by running cmake.

scivision commented 1 year ago

this creates file ${CMAKE_CURRENT_BINARY_DIR}/.gitignore. It doesn't affect the repository source .gitignore. It implicitly is in the build directory

scivision commented 1 year ago

Oh I see, if one is using in-source build then it would overwrite--this logic fixes that.

if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
    # Git auto-ignore out-of-source build directory
    file(GENERATE OUTPUT .gitignore CONTENT "*")
endif()
certik commented 1 year ago

Ok, now it should work.

scivision commented 1 year ago

Oops I made a silly mistake. I put the correct logic in #28 .

if(NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
certik commented 1 year ago

Can you send a PR with just this change? I have to test carefully every change to the build system.

certik commented 1 year ago

I sent a PR with this fix here: https://github.com/certik/fastGPT/pull/35