Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
STIR
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Installing STIR with CMake
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Launching CMake== === Setting your environment === You might need to set your environment correctly first such that CMake finds the correct libraries etc. Examples are * [https://docs.python.org/3/tutorial/venv.html Python virtual environments] (e.g. via <tt>conda activate</tt> or similar) * The CERN ROOT library for GATE simulations comes with a [https://github.com/root-project/root/blob/master/config/thisroot.sh thisroot.sh] (or.csh) script that needs to be sourced. This step is not strictly necessary, as it is also possible to set the location of any libraries/include files in the CMake Configuration step, but this tends to be harder work. === Using the CMake GUI === If you have Windows or MacOSX, ''CMake'' comes as an application with a nice GUI. For Unix/linux users, you get that by installing ''cmake-gui''. Please note that if you launch CMake from your desktop environment, you will have to make sure that any configuration from the previous section is available to such applications (which usually isn't the case). It might be best to launch ''cmake-gui'' from the command line. After launching it, you first select the source directory (''STIR'', <b>not</b> ''STIR/src'') and then a build directory. It's recommended to build one level up from STIR. Call it anything you like, e.g. STIR-bin. On Unix/Linux you will probably be using ''make'' to build things. When using ''make'', you want different build directories for every type of build (Debug or Release) you want to make. For systems using an IDE (e.g. Windows with Visual Studio or MacOS with XCode, Linux with eclipse), you can build different versions from one CMake build directory. === From a terminal window === On Unix/linux, cygwin or MacOSX, you can also launch ''CMake'' from a terminal window. In that case, you will have to use a slightly more basic user interface. You would launch this as follows. <pre> cd /wherever/it/is/STIR cd .. mkdir STIR-bin cd STIR-bin mkdir Release cd Release ccmake ../../STIR </pre> If you want to use a non-default compiler, please check [http://www.cmake.org/Wiki/CMake_FAQ%23How_do_I_use_a_different_compiler.3F the CMake FAQ on how to use a different compiler]. === Special cases for Windows === In some very special cases, you will need to let CMake find non-standard libraries or executables. Most people will not need this, but if you do, please check [[Using CMake on Windows with special requirements]].
Summary:
Please note that all contributions to STIR may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
STIR:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width