SCIRun User Mailing List

Text archives Help

[SCIRUN-USERS] Fwd: cmake issues with scirun

Chronological Thread 
  • From: "Brad Hollister" <>
  • To:
  • Subject: [SCIRUN-USERS] Fwd: cmake issues with scirun
  • Date: Tue, 03 Nov 2015 16:57:05 -0700

As a quick follow-up on using Eclipse...

The "out-of-source" build was also needed (not just the CMakeLists.txt change) for Eclipse to see the .cxx source.

--- the forwarded message follows ---
--- Begin Message ---
  • From: "Brad Hollister" <>
  • To:
  • Subject: Re: [SCIRUN-USERS] cmake issues with scirun
  • Date: Tue, 03 Nov 2015 16:28:17 -0700
  • List-archive: <>
  • List-id: <>

Actually, the flag / source_dir (CMAKE_SOURCE_DIR) order doesn't matter to cmake.

The way I fixed this issue was to move the CMakeLists.txt to the parent directory of Superbuild/ instead of being in Superbuild/ (since the source_dir can't be a sibling of where the actual source .cxx is located for Eclipse to find it).

Once that was done, then I had to update CMakeLists.txt by changing the line:


to this instead,


The above change required the lines of CMAKE_SOURCE_DIR/Superbuild/Superbuild.cmake:


to be edited via,


since CMAKE_CURRENT_SOURCE_DIR would now be the parent of Superbuild/ in the former case.

If you want, I can create a pull request / patch for this...

Incidentally, I chose to create a separate sibling directory to SCIRun/ for an out-of-source build instead of SCIRun/bin/. So, from there, I ran:

cmake ../SCIRun/ -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

Looks like this is working for Eclipse now. Here are some good references that I found:

Lastly, even though I did an out-of-source build (build directory sibling of CMAKE_SOURCE_DIR), from the following it looks like Eclipse prefers in-source builds which is ironically opposed to the CMake philosophy.


"Note Regarding Out-Of-Source Builds: Eclipse CDT will work better if the the build directory is located within the source directory. Doing so makes it easier to configure Eclipse to Debug and Run your program. It is possible to store your build directory completely outside of the source directory however setting up the ability to debug and run your targets will be slightly more complicated. Regardless of how you set things up, it is currently not possible to use the same source directory with multiple Eclipse projects. Eclipse stores a .project and .cproject file in the root of each project (your source tree in this case) and keeps track of active projects. It will not allow you to reuse a source directory twice (as it views them as project directories)."

Either way, the problem I had encountered, which was that Eclipse was not finding the .cxx source files in the IDE, was due to the location of CMakeLists.txt and not an in-source versus out-of-source build.

On Tue, 3 Nov 2015 12:29:53 -0700
Ayla Khan <> wrote:
Hi Brad,

Try instead: cmake -G"Eclipse CDT4 - Unix Makefiles" ../Superbuild/ from your build directory (empty, I assume?).

CMake should be invoked with the option flags first, then the path to the source CMakeLists.txt file, which is in the Superbuild directory.


On Nov 2, 2015, at 4:56 PM, Brad Hollister wrote:

Thank you. The builds are now working for me. However, I have another question:

I want to set up an Eclipse development environment. CMake outputs Eclipse project files via:

cmake . -G"Eclipse CDT4 - Unix Makefiles"

When I execute this in bin/ (the build directory?), the project is missing the source files. Is there a different directory that I should generate the Eclipse project file from?


P.S. This works for Blender. See:

On Fri, 30 Oct 2015 21:51:22 -0600
"Daniel White" <> wrote:
Ah, you found another known build quirk: you need to use an older version of cmake. We've been using 2.8.11 successfully. Hopefully we can get that fixed too.
On Fri, 30 Oct 2015 16:06:37 -0600
"Brad Hollister" <> wrote:
Hm. Okay, the first invocation of make fails. Here is the tail of the output:
Generating grammar tables from /home/behollis/SCII/scirun5/SCIRun/bin/Externals/Install/Python_external/lib/python3.4/lib2to3/PatternGrammar.txt
Writing grammar tables to /home/behollis/SCII/scirun5/SCIRun/bin/Externals/Install/Python_external/lib/python3.4/lib2to3/
[ 76%] Completed 'Python_external'
[ 76%] Built target Python_external
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
I've installed both the packages: 'qt4-dev-tools qt4-qmake' and the packages: 'qt5-dev-tools qt5-qmake', before going thru the procedure provided. Btw, this is all being done on Ubuntu 15.04.
When running ./, the build apparently fails as well.
CMake Warning (dev) at CMakeLists.txt:472 (EXPORT_LIBRARY_DEPENDENCIES):
Policy CMP0033 is not set: The export_library_dependencies command should
not be called. Run "cmake --help-policy CMP0033" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/behollis/SCII/SCIRun/bin/Externals/Build/Teem_external/CMakeFiles/CMakeOutput.log".
See also "/home/behollis/SCII/SCIRun/bin/Externals/Build/Teem_external/CMakeFiles/CMakeError.log".
CMakeFiles/Teem_external.dir/build.make:103: recipe for target 'Externals/Stamp/Teem_external/Teem_external-configure' failed
make[2]: *** [Externals/Stamp/Teem_external/Teem_external-configure] Error 1
CMakeFiles/Makefile2:347: recipe for target 'CMakeFiles/Teem_external.dir/all' failed
make[1]: *** [CMakeFiles/Teem_external.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
Building SCIRun returned an error
Either the code failed to build properly or
the testing programs failed to complete without
every single test program passing the test.
On Fri, 30 Oct 2015 15:04:27 -0600
Dan White <> wrote:
We've recently overhauled the build structure so our documentation is out of date. Other than Qt 4.8, SCIRun includes all external dependencies either as part of the source or as a git external project that gets downloaded as part of the build. Qt is the only dependency that needs to be separately built. No apt-getting or prefix_path setting should be required. The steps on a *nix system are as follows:
mkdir scirun5; cd scirun5
git clone
cd SCIRun/bin
cmake ../Superbuild
# above line might be required TWICE
make -j4
# after success, you can cd SCIRun (that's right, SCIRun/bin/SCIRun), and just
make -j8
Or you could try the new build script, located under in the root called Let us know if you run into difficulties. We'll update the build instructions soon.
On 10/30/2015 2:27 PM, Brad Hollister wrote:
To Whom It May Concern,

When running CMake for a SCIRun build, I am having the following issues...

I am able to set CMAKE_PREFIX_PATH to the Externals/ directory which prevents issues up until SQLite_external. When I install sqlite-dev via apt-get, and set SQLite_DIR accordingly, CMake still fails with the same repeated warning.

I've noticed a SCIRun/Superbuild directory that contains the external library *.cmake files. But, when pointing CMAKE_PREFIX_PATH to Superbuild/, CMake still fails to work.

Any suggestions?

CMake produces the initial following warnings before setting any of its variables:

CMake Warning at CMakeLists.txt:193 (MESSAGE):
Test resource path does not exist. Please set it correctly to run all the
unit and regression tests. Clone this github repo to get all the files:

CMake Warning at CMakeLists.txt:217 (FIND_PACKAGE):
Could not find a package configuration file named "ZlibConfig.cmake"
provided by package "Zlib".

Add the installation prefix of "Zlib" to CMAKE_PREFIX_PATH or set
"Zlib_DIR" to a directory containing one of the above files. If "Zlib"
provides a separate development package or SDK, be sure it has been

CMake Error at CMakeLists.txt:219 (MESSAGE):
Zlib library not found in Zlib_DIR-NOTFOUND

Additionally, I do have Zlib in my PATH var.

--- End Message ---

  • [SCIRUN-USERS] Fwd: cmake issues with scirun, Brad Hollister, 11/03/2015

Archive powered by MHonArc 2.6.18.

Top of page