Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SOLVED CMake whose "source directory" ?

SOLVED CMake whose "source directory" ?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structures
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav_
    wrote on last edited by
    #1

    First use of CMake, went relatively OK I did run CMake to build OpenCV , build it with "warning": CMake Warning at CMakeLists.txt:1250 (message): The source directory is the same as binary directory. "make clean" may damage the source tree What is "source directory" ? I did messed up some of the "destinations" , but before I'll try it again like to have an answer about "source directory". Thanks Cheers Vaclav The "source directory" CMake asked for was directory WERE CMakeLists.txt file is.

    C A V 3 Replies Last reply
    0
    • V Vaclav_

      First use of CMake, went relatively OK I did run CMake to build OpenCV , build it with "warning": CMake Warning at CMakeLists.txt:1250 (message): The source directory is the same as binary directory. "make clean" may damage the source tree What is "source directory" ? I did messed up some of the "destinations" , but before I'll try it again like to have an answer about "source directory". Thanks Cheers Vaclav The "source directory" CMake asked for was directory WERE CMakeLists.txt file is.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      Vaclav_Sal wrote:

      What is "source directory" ?

      isn't that where the source files live?

      image processing toolkits | batch image processing

      V 1 Reply Last reply
      0
      • C Chris Losinger

        Vaclav_Sal wrote:

        What is "source directory" ?

        isn't that where the source files live?

        image processing toolkits | batch image processing

        V Offline
        V Offline
        Vaclav_
        wrote on last edited by
        #3

        Duh, WHOSE source ? CMake or the OpenCV ?

        C 1 Reply Last reply
        0
        • V Vaclav_

          Duh, WHOSE source ? CMake or the OpenCV ?

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          OpenCV. it's complaining that cleaning the build products might damage the source because they're in the same directories.

          image processing toolkits | batch image processing

          V 1 Reply Last reply
          0
          • C Chris Losinger

            OpenCV. it's complaining that cleaning the build products might damage the source because they're in the same directories.

            image processing toolkits | batch image processing

            V Offline
            V Offline
            Vaclav_
            wrote on last edited by
            #5

            Yes, I got "the complaint " OK that why I was not sure about the source directory. Thanks

            1 Reply Last reply
            0
            • V Vaclav_

              First use of CMake, went relatively OK I did run CMake to build OpenCV , build it with "warning": CMake Warning at CMakeLists.txt:1250 (message): The source directory is the same as binary directory. "make clean" may damage the source tree What is "source directory" ? I did messed up some of the "destinations" , but before I'll try it again like to have an answer about "source directory". Thanks Cheers Vaclav The "source directory" CMake asked for was directory WERE CMakeLists.txt file is.

              A Offline
              A Offline
              Albert Holguin
              wrote on last edited by
              #6

              CMake expects you to run it "out of the source tree"... meaning that you run it from some "build" directory where all the build binaries will be stored. That keeps the source separate from any build artifacts. It's warning you that you're building from within your source directory. In simple terms... if you have a source tree that looks like this: OpenCV |-directory1 |-directory2 |-directory3 |-source_file1 |-source_file2 |-CMakeLists.txt When you run the CMake command, it should be from a separate, self contained directory: OpenCV |-build_dir |-directory1 |-directory2 |-directory3 |-source_file1 |-source_file2 |-CMakeLists.txt That keep all the build artifacts in "build_dir" so if you need to blow away your build, it's easy to do so without messing with the source. In this case, to launch cmake, go into your build_dir and launch with cmake ../ -DANYOTHERCMAKEARGS .

              V 1 Reply Last reply
              0
              • A Albert Holguin

                CMake expects you to run it "out of the source tree"... meaning that you run it from some "build" directory where all the build binaries will be stored. That keeps the source separate from any build artifacts. It's warning you that you're building from within your source directory. In simple terms... if you have a source tree that looks like this: OpenCV |-directory1 |-directory2 |-directory3 |-source_file1 |-source_file2 |-CMakeLists.txt When you run the CMake command, it should be from a separate, self contained directory: OpenCV |-build_dir |-directory1 |-directory2 |-directory3 |-source_file1 |-source_file2 |-CMakeLists.txt That keep all the build artifacts in "build_dir" so if you need to blow away your build, it's easy to do so without messing with the source. In this case, to launch cmake, go into your build_dir and launch with cmake ../ -DANYOTHERCMAKEARGS .

                V Offline
                V Offline
                Vaclav_
                wrote on last edited by
                #7

                I think the problem is "descriptive terminology". I have a "mother directory" OpenCV with CMakeList.txt file I execute using CMake. I did not bother to find were CMake resides. Now CMake wants to know "source directory". That is why I asked - apparently it is the "mother directory" and not some specific real source code of OpenCV. ( I suppose analyzing CMake would give some clue ) Now CMake will build OpenCV library and again - where should this "build" be? Logically it belongs under the mother directory just to keep things under common directory. Apparently, and I do not discount I made some other mistake, that caused the warning. It all sounds pretty simple, but turns difficult to troubleshoot when things do not go right. For example CMake finishes the "build" gives no "option" to quit / exit -just ask for same "click this or that again ". But I am making some progress thanks to this forum. Cheers Vaclav

                1 Reply Last reply
                0
                • V Vaclav_

                  First use of CMake, went relatively OK I did run CMake to build OpenCV , build it with "warning": CMake Warning at CMakeLists.txt:1250 (message): The source directory is the same as binary directory. "make clean" may damage the source tree What is "source directory" ? I did messed up some of the "destinations" , but before I'll try it again like to have an answer about "source directory". Thanks Cheers Vaclav The "source directory" CMake asked for was directory WERE CMakeLists.txt file is.

                  V Offline
                  V Offline
                  Vaclav_
                  wrote on last edited by
                  #8

                  I have no idea how my initial post got duplicated. My apology to forum Vaclav

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups