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

Replace make_directory with file(MAKE_DIRECTORY <directories>...) #954

Closed
jfdev001 opened this issue Mar 18, 2025 · 1 comment · Fixed by #956
Closed

Replace make_directory with file(MAKE_DIRECTORY <directories>...) #954

jfdev001 opened this issue Mar 18, 2025 · 1 comment · Fixed by #956

Comments

@jfdev001
Copy link
Contributor

Per https://cmake.org/cmake/help/latest/command/make_directory.html, the command

make_directory

is deprecated since cmake 3.0 and file(MAKE_DIRECTORY <directories>...) should be used instead (see https://cmake.org/cmake/help/latest/command/file.html#make-directory).

make_directory is used in the following files:

make_directory("${LIB_MOD_DIR}")

make_directory("${${_pkg}_BINARY_DIR}/include")

make_directory("${${_pkg}_BINARY_DIR}/include")

Since the cmake minimum version for the project is 3.14 anyways, I think it would make sense to use the recommended method (i.e., file(MAKE_DIRECTORY)) of creating directories. If this change makes sense, I can go ahead and open PR to make the necessary substitution.

@jfdev001 jfdev001 changed the title replace make_directory with file(MAKE_DIRECTORY <directories>...) Replace make_directory with file(MAKE_DIRECTORY <directories>...) Mar 18, 2025
@jalvesz
Copy link
Contributor

jalvesz commented Mar 18, 2025

Sounds about right! I would be in favor of this update.

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 a pull request may close this issue.

2 participants