CMake Makefile path to file not found2019 Community Moderator ElectionWhat is the difference between the GNU Makefile variable assignments =, ?=, := and +=?CMake, Xcode and Unix MakefileWhat is the purpose of .PHONY in a makefile?CMake can not find include filescmake - NMake Makefiles issueMinGW trying to use cmd.exe from CMake Makefilescmake generated makefile doesn't create static libraryCmake and resources pathHow to get path to object files with CMake for both multiconfiguration generator and makefile based ones?Fortran module files not found by CMake
Why is it "take a leak?"
A bug in Excel? Conditional formatting for marking duplicates also highlights unique value
Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?
If nine coins are tossed, what is the probability that the number of heads is even?
What is better: yes / no radio, or simple checkbox?
What are SHA-rounds?
3.5% Interest Student Loan or use all of my savings on Tuition?
Should we avoid writing fiction about historical events without extensive research?
Where is the fallacy here?
Inconsistent behaviour between dict.values() and dict.keys() equality in Python 3.x and Python 2.7
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
Why can't we make a perpetual motion machine by using a magnet to pull up a piece of metal, then letting it fall back down?
How does signal strength relate to bandwidth?
Split a number into equal parts given the number of parts
Can a gentile pronounce a blessing for a Jew? Are there songs I can sing that will bring peace?
How does insurance birth control work?
Movie: Scientists travel to the future to avoid nuclear war, last surviving one is used as fuel by future humans
Should I use HTTPS on a domain that will only be used for redirection?
Relationship between the symmetry number of a molecule as used in rotational spectroscopy and point group
Misplaced tyre lever - alternatives?
Can an earth elemental drown/bury its opponent underground using earth glide?
When do _WA_Sys_ statistics Get Updated?
Is divide-by-zero a security vulnerability?
Is the NES controller port identical to the port on a Wii remote?
CMake Makefile path to file not found
2019 Community Moderator ElectionWhat is the difference between the GNU Makefile variable assignments =, ?=, := and +=?CMake, Xcode and Unix MakefileWhat is the purpose of .PHONY in a makefile?CMake can not find include filescmake - NMake Makefiles issueMinGW trying to use cmd.exe from CMake Makefilescmake generated makefile doesn't create static libraryCmake and resources pathHow to get path to object files with CMake for both multiconfiguration generator and makefile based ones?Fortran module files not found by CMake
I have a problem with a CMake project using the following setup to include
missing source directories to pull in missing dependencies:
if (NOT TARGET loggerlib)
add_subdirectory($COMMON_PROJECT_ROOT/LoggerLib build_LoggerLib)
endif()
If this code gets executed the build_LoggerLib subdirectory is created and configured (using MSYS Makefiles generator)
However, when I run "make", the build stops because a file is not found.
The reason seems to be the following Makefile code:
build_LoggerLib/Sources/moc_LoggerObject.cpp: C:/Projects/XXX/LoggerLib/Sources/LoggerObject.h
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/C/Projects/XXX/Core/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating Sources/moc_LoggerObject.cpp"
cd /C/Projects/XXX/Core/build/build_LoggerLib/Sources && @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters
The path @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters however does exist and I can rule out that
the path is not too long.
If I manually change the notation @C:/... to @/C/ the problem persists.
What am I missing here?
makefile cmake msys2
add a comment |
I have a problem with a CMake project using the following setup to include
missing source directories to pull in missing dependencies:
if (NOT TARGET loggerlib)
add_subdirectory($COMMON_PROJECT_ROOT/LoggerLib build_LoggerLib)
endif()
If this code gets executed the build_LoggerLib subdirectory is created and configured (using MSYS Makefiles generator)
However, when I run "make", the build stops because a file is not found.
The reason seems to be the following Makefile code:
build_LoggerLib/Sources/moc_LoggerObject.cpp: C:/Projects/XXX/LoggerLib/Sources/LoggerObject.h
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/C/Projects/XXX/Core/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating Sources/moc_LoggerObject.cpp"
cd /C/Projects/XXX/Core/build/build_LoggerLib/Sources && @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters
The path @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters however does exist and I can rule out that
the path is not too long.
If I manually change the notation @C:/... to @/C/ the problem persists.
What am I missing here?
makefile cmake msys2
It seems that you are using Windows-style path (<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you haveadd_custom_commandcall, which uses fileC:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parametersas an executable (the first argument after COMMAND option). Show thatadd_custom_commandcall.
– Tsyvarev
9 hours ago
add a comment |
I have a problem with a CMake project using the following setup to include
missing source directories to pull in missing dependencies:
if (NOT TARGET loggerlib)
add_subdirectory($COMMON_PROJECT_ROOT/LoggerLib build_LoggerLib)
endif()
If this code gets executed the build_LoggerLib subdirectory is created and configured (using MSYS Makefiles generator)
However, when I run "make", the build stops because a file is not found.
The reason seems to be the following Makefile code:
build_LoggerLib/Sources/moc_LoggerObject.cpp: C:/Projects/XXX/LoggerLib/Sources/LoggerObject.h
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/C/Projects/XXX/Core/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating Sources/moc_LoggerObject.cpp"
cd /C/Projects/XXX/Core/build/build_LoggerLib/Sources && @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters
The path @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters however does exist and I can rule out that
the path is not too long.
If I manually change the notation @C:/... to @/C/ the problem persists.
What am I missing here?
makefile cmake msys2
I have a problem with a CMake project using the following setup to include
missing source directories to pull in missing dependencies:
if (NOT TARGET loggerlib)
add_subdirectory($COMMON_PROJECT_ROOT/LoggerLib build_LoggerLib)
endif()
If this code gets executed the build_LoggerLib subdirectory is created and configured (using MSYS Makefiles generator)
However, when I run "make", the build stops because a file is not found.
The reason seems to be the following Makefile code:
build_LoggerLib/Sources/moc_LoggerObject.cpp: C:/Projects/XXX/LoggerLib/Sources/LoggerObject.h
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/C/Projects/XXX/Core/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating Sources/moc_LoggerObject.cpp"
cd /C/Projects/XXX/Core/build/build_LoggerLib/Sources && @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters
The path @C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters however does exist and I can rule out that
the path is not too long.
If I manually change the notation @C:/... to @/C/ the problem persists.
What am I missing here?
makefile cmake msys2
makefile cmake msys2
asked 9 hours ago
Jens LuedickeJens Luedicke
7541618
7541618
It seems that you are using Windows-style path (<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you haveadd_custom_commandcall, which uses fileC:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parametersas an executable (the first argument after COMMAND option). Show thatadd_custom_commandcall.
– Tsyvarev
9 hours ago
add a comment |
It seems that you are using Windows-style path (<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you haveadd_custom_commandcall, which uses fileC:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parametersas an executable (the first argument after COMMAND option). Show thatadd_custom_commandcall.
– Tsyvarev
9 hours ago
It seems that you are using Windows-style path (
<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you have add_custom_command call, which uses file C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters as an executable (the first argument after COMMAND option). Show that add_custom_command call.– Tsyvarev
9 hours ago
It seems that you are using Windows-style path (
<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you have add_custom_command call, which uses file C:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parameters as an executable (the first argument after COMMAND option). Show that add_custom_command call.– Tsyvarev
9 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021252%2fcmake-makefile-path-to-file-not-found%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021252%2fcmake-makefile-path-to-file-not-found%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It seems that you are using Windows-style path (
<driver-letter>:/...) when CMake expects cmake-style path (/<driver-letter>/...). According to the Makefile created, you haveadd_custom_commandcall, which uses fileC:/Projects/XXX/Core/build/build_LoggerLib/Sources/moc_LoggerObject.cpp_parametersas an executable (the first argument after COMMAND option). Show thatadd_custom_commandcall.– Tsyvarev
9 hours ago