[CMake] Changing the actual "src" directory where VS project and/or sln files are rooted
Michael Powell
mwpowellhtx at gmail.com
Sat Sep 16 17:25:46 EDT 2017
Hello,
Sorry if this seems like a rookie/novice question. I'm not new to
CI/CD, however; this question may have been asked before, I don't
know.
I'll preface with a little background. It's been a little while for me
using and truly "grokking" CMake, but if memory serves, CMake lifts
raw source inputs and drops them into what becomes a meta-description
for what is ultimately being built. That could overlay the source
directories, but may not. That's if memory serves.
Now, I am trying to configure and generated CMake targeting the Visual
Studio 2015 environment.
My repository is organized something like:
$/CMakeLists.txt
$/src
$/src/CMakeLists.txt
$/src/... (for things like tests, etc)
And so on.
Solution files are landing in the $/ directory, but I want them to
land in the $/src directory as is customary for Visual Studio
solutions.
First, as far as I know, the OA (original author) is dropping
CMake-driven output in the same context as the source files. Maybe
that's good and/or acceptable, maybe not, considering the
meta-descriptive nature of CMake.
So the first question is how to cause CMake to respect the $/src
objective. Otherwise, perhaps I simply have CMake generate the
penultimate build structure.
Close behind those questions is how to avoid outputs like ALL_BUILD
and ZERO_CHECK. Those are not necessary, or perhaps are don't care,
especially if output can land in $/src as envisioned.
Thank you!
Regards,
Michael Powell
More information about the CMake
mailing list