Thanks for the comments I've update the wiki. Top-level only now marked as
anti-pattern
https://github.com/toomuchatonce/cmake-examples/wiki/cmake-patterns-and-examples
If there are other patterns / anti-patterns you've seen please send me a
pull request and I'll add them.
I'm particularly intere
Jc,
Im been updating my CMakeLists.txt to do this superbuild. But I am running
into an error. Im not sure why...
My project is something like the following:
cmake_minimum_required(VERSION 2.8.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake"
Thanks!
On Tue, Jun 3, 2014 at 6:25 AM, David Cole wrote:
> > Are there some good examples of why one would use bracket arguments?
>
>
> I think one of the major use cases for bracket arguments is in
> "file(WRITE" so you can embed literal python code (or Lua, or
> javascript, or ...) directly
"Just put all the build commands in the top level cmake file."
Definitely an anti-pattern. As you mentioned, it definitely doesn't
scale. The problem with even doing this for a simple project is that it
builds this behavior for people trying to learn cmake through simple
examples. This very ver
Great to see these examples with pros and cons.
I believe the staticlibs-include example [0] pattern, though mentioned
in Mastering CMake [1], generally is deprecated in favor of
add_subdirectory with CMakeLists.txt at each level for self-contained
projects.
[0]
https://github.com/toomuchatonce/
> Are there some good examples of why one would use bracket arguments?
I think one of the major use cases for bracket arguments is in
"file(WRITE" so you can embed literal python code (or Lua, or
javascript, or ...) directly in the argument to the file command and
have a section of your CMakeList