I'm trying to debug a cmake file that works from the command line and fails in clion. In particular, I have a function like this:
message("Already building dependency!")
set(ALREADY_BUILDING ON CACHE BOOL "Build dependency")
My working hypothesis is that something in clion is setting ALREADY_BUILDING to ON, and so the add_subdirectory call never gets called. I haven't been able to figure out where the cmake output is for a successful run (here "successful" is "cmake did not error out") so I can't check to see what's really going on. (I need the cache variable because I don't have a lot of control over the targets that are added in the add_subdirectory call, otherwise I'd do an "if(target blah)").
Does anybody have any ideas? My external cmake is 3.4.0 vs clion's 3.3.2, but I'm reasonably confident our build server is using an older cmake, and it works there too.