
################################################
## ZJK May 19th 2017
##
## Directly below are Koen Van Leemput's instructions for building GEMS.
## At the end of this document I have appended my build instructions
## for how to build this directory on the Martinos Center filesystem.
################################################


I used cmake-3.5.2, which has a nice Matlab Mex compilation option without any further hassles. 

In all CMake commands below, make sure to set the CMAKE_BUILD_TYPE to "Release" (optimized and thus faster code)

In general, if you're interested in the Matlab Mex files then it's easiest to compile everything using shared libraries everywhere. 
Otherwise, on amd64 (x86_64) platform all ITK etc. libraries will need to be built with Position Independent Code, i.e., the -fPIC 
switch for gcc, because we will be building a shared library (mex-files really are renamed shared libraries). In order to do that, 
set the following compilation flags in CMake: CMAKE_CXX_FLAGS=-fPIC and CMAKE_C_FLAGS=-fPIC.

At the Martinos center, the Matlab set-up is very convoluted and CMake doesn't it find everything it needs automatically. The trick is to set the Matlab path straight to it's actual location:

  /usr/pubsw/common/matlab/8.4/
  
Other than that, I used the following versions:

* InsightToolkit-4.9.1 (shared libs on, V3 compatibility on)
  (InsightToolkit-3.20.0.tar.gz doesn't compile with my current compiler)
  V3 compatibility is needed for kvlRegisterer.h/cxx since you nowadays have to call "Update()" to start registration, and itkAffine3DTransform.h/cxx (also only needed for kvlRegisterer and kvlResampler) needs nowadays different Jacobian interfaces. Nothing major - we never use Jacobian so could just throw an exception if someone attempts to use - but I simply don't have time for it now. In any case, do we really still need kvlRegisterer and kvlResampler in the long run?
 
CMake will need the ITK_DIR environment variable set to the directory containing ITKConfig.cmake

* gmm-5.0 (GMM++ C++ templated library for sparse matrix solvers; used only in Levenberg-Marquardt. If nobody is using this, maybe we can just throw it out in the future?)

  ./configure 
  make

Note that this is a header library, so to actually compile anything you will need to run
  make check

* tetgen1.4.2 (used in one of the initial stages of the atlas building, so as to start with a sparse mesh in the background thereby saving mesh simplification time)

    tar xvfz tetgen1.4.2.tar.gz 
    cd tetgen1.4.2

    Usually you'd now type "make tetlib", but if you've switched shared libs on, you need to manually do it with the -fPIC option specified:

    g++ -O0 -c -fPIC predicates.cxx
    g++ -g -Wall -DSELF_CHECK -DTETLIBRARY -fPIC -c tetgen.cxx
    ar r libtet.a tetgen.o predicates.o

For GUI:   
   
  * VTK5.10.1 (with lots of warnings using new CMake, but seems to work fine)
  Using older version because VTK7 and even VTK6 has changed pipeline architecture from "b->SetInput( a->GetOutput() )" into "b->SetInputConnection( a->GetOutputPort() )". That's of course trivial to change in kvlImageViewer.cxx (which is the only VTK-using class), but there are also non-trial ITK-to-VTK pipeline connectors for which I really just don't have the time to adjust right now.

  * fltk-1.1.10 (I also tried the newest version fltk-1.3.3 because it supports CMake builds, but sadly (1) had some link problems for me when trying to use CMake, and (2) even without CMake I got same very strange link problems in my own GUI code)

     ./configure --enable-shared
     make -j 8

################################################
## ZJK May 19th 2017
##
## Below are my build instructions for how to build this 
## directory on the Martinos Center filesystem.
################################################

These are the set of instructions Ive used to build the new GEMS2 directory:

1) Ssh to a centos7 machine (which uses gcc4.8). Nike, nicki, sangwoo, topaz
   are all centos7 machines.

2) Create the ITK_DIR environment variable and set it to the directory 
   containing the ITKConfig.cmake file: 

   export ITK_DIR=/usr/pubsw/packages/itk/4.9.1/build

3) cd to the GEMS2 directory.

4) ccmake .

   Below Ive copied all the ccmake settings used for my build. Of particular
   importance are the following setting: 

   CMAKE_BUILD_TYPE=Release,  
   CMAKE_CXX_FLAGS=-fPIC -fpermissive
   CMAKE_C_FLAGS=-fPIC -fpermissive
   CMAKE_INSTALL_PREFIX=<your preferred installation location>
   Matlab_ROOT_DIR=/usr/pubsw/common/matlab/8.4 

5) cmake .

6) make

7) make install  








#This is the CMakeCache file.
# For build in directory: /space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.

########################
# EXTERNAL cache entries
########################

//Build command line executables
BUILD_EXECUTABLES:BOOL=OFF

//Build GUI components (requires FLTK and VTK)
BUILD_GUI:BOOL=OFF

//Build Matlab wrappers
BUILD_MATLAB:BOOL=ON

//Build GEMS with shared libraries.
BUILD_SHARED_LIBS:BOOL=ON

//Build tests
BUILD_TESTING:BOOL=OFF

//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=Release

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-fPIC -fpermissive

//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum
// size.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=-fPIC -fpermissive

//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum
// size.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/autofs/space/sand_001/users/zkaufman/fsdev/trunk.sync/dev/GEMS2.install

//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld

//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake

//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=GEMS

//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib

//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip

//If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Compile device code in 64 bit mode
CUDA_64_BIT_DEVICE_CODE:BOOL=ON

//Attach the build rule to the CUDA source file.  Enable only when
// the CUDA source file is added to at most one target.
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON

//Generate and parse .cubin files in Device mode.
CUDA_BUILD_CUBIN:BOOL=OFF

//Build in Emulation mode
CUDA_BUILD_EMULATION:BOOL=OFF

//"cudart" library
CUDA_CUDART_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcudart.so

//"cuda" library (older versions only).
CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib64/libcuda.so

//Directory to put all the output files.  If blank it will default
// to the CMAKE_CURRENT_BINARY_DIR
CUDA_GENERATED_OUTPUT_DIR:PATH=

//Generated file extension
CUDA_HOST_COMPILATION_CPP:BOOL=ON

//Host side compiler used by NVCC
CUDA_HOST_COMPILER:FILEPATH=/usr/bin/cc

//Path to a program.
CUDA_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda/bin/nvcc

//Semi-colon delimit multiple arguments.
CUDA_NVCC_FLAGS:STRING=

//Semi-colon delimit multiple arguments.
CUDA_NVCC_FLAGS_DEBUG:STRING=

//Semi-colon delimit multiple arguments.
CUDA_NVCC_FLAGS_MINSIZEREL:STRING=

//Semi-colon delimit multiple arguments.
CUDA_NVCC_FLAGS_RELEASE:STRING=

//Semi-colon delimit multiple arguments.
CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING=

//Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile
CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON

//Path to a file.
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND

//Compile CUDA objects with separable compilation enabled.  Requires
// CUDA 5.0+
CUDA_SEPARABLE_COMPILATION:BOOL=OFF

//Specify the name of the class of CPU architecture for which the
// input files must be compiled.
CUDA_TARGET_CPU_ARCH:STRING=

//Path to a file.
CUDA_TOOLKIT_INCLUDE:PATH=/usr/local/cuda/include

//Toolkit location.
CUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda

//Toolkit target location.
CUDA_TOOLKIT_TARGET_DIR:PATH=CUDA_TOOLKIT_ROOT_DIR-NOTFOUND

//Use the static version of the CUDA runtime library if available
CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=OFF

//Print out the commands run while compiling the CUDA source file.
//  With the Makefile generator this defaults to VERBOSE variable
// specified on the command line, but can be forced on with this
// option.
CUDA_VERBOSE_BUILD:BOOL=OFF

//Version of CUDA as computed from nvcc.
CUDA_VERSION:STRING=8.0

//"cublas" library
CUDA_cublas_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcublas.so

//"cublasemu" library
CUDA_cublasemu_LIBRARY:FILEPATH=CUDA_cublasemu_LIBRARY-NOTFOUND

//static CUDA runtime library
CUDA_cudart_static_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcudart_static.a

//"cufft" library
CUDA_cufft_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcufft.so

//"cufftemu" library
CUDA_cufftemu_LIBRARY:FILEPATH=CUDA_cufftemu_LIBRARY-NOTFOUND

//"cupti" library
CUDA_cupti_LIBRARY:FILEPATH=/usr/local/cuda/extras/CUPTI/lib64/libcupti.so

//"curand" library
CUDA_curand_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcurand.so

//"cusolver" library
CUDA_cusolver_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcusolver.so

//"cusparse" library
CUDA_cusparse_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libcusparse.so

//"nppc" library
CUDA_nppc_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppc.so

//"nppi" library
CUDA_nppi_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnppi.so

//"npps" library
CUDA_npps_LIBRARY:FILEPATH=/usr/local/cuda/lib64/libnpps.so

//Value Computed by CMake
GEMS_BINARY_DIR:STATIC=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2

//Value Computed by CMake
GEMS_SOURCE_DIR:STATIC=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2

//The directory containing a CMake configuration file for ITK.
ITK_DIR:PATH=/usr/pubsw/packages/itk/4.9.1/build

//Path to a file.
Matlab_INCLUDE_DIRS:PATH=/usr/pubsw/common/matlab/8.4/extern/include

//Extensions for the mex targets (automatically given by Matlab)
Matlab_MEX_EXTENSION:STRING=mexa64

//Path to a library.
Matlab_MEX_LIBRARY:FILEPATH=/usr/pubsw/common/matlab/8.4/bin/glnxa64/libmex.so

//Matlab installation root path
Matlab_ROOT_DIR:PATH=/usr/pubsw/common/matlab/8.4

//Dependencies for the target
kvlGEMSCUDA_LIB_DEPENDS:STATIC=general;/usr/local/cuda/lib64/libcudart.so;

//Dependencies for the target
kvlGEMSCommon_LIB_DEPENDS:STATIC=general;itkdouble-conversion;general;itksys;general;itkvnl_algo;general;itkvnl;general;itkv3p_netlib;general;ITKCommon;general;itkNetlibSlatec;general;ITKStatistics;general;ITKTransform;general;ITKLabelMap;general;ITKMesh;general;itkzlib;general;ITKMetaIO;general;ITKSpatialObjects;general;ITKPath;general;ITKQuadEdgeMesh;general;ITKIOImageBase;general;ITKOptimizers;general;ITKPolynomials;general;ITKBiasCorrection;general;ITKBioCell;general;ITKDICOMParser;general;ITKEXPAT;general;gdcmDICT;general;gdcmMSFF;general;ITKIOGDCM;general;ITKznz;general;ITKniftiio;general;ITKDeprecated;general;ITKIOXML;general;ITKIOSpatialObjects;general;ITKFEM;general;ITKgiftiio;general;itkhdf5_cpp;general;itkhdf5;general;ITKIOBMP;general;ITKIOBioRad;general;ITKIOCSV;general;ITKIOIPL;general;ITKIOGE;general;ITKIOGIPL;general;ITKIOHDF5;general;itkjpeg;general;ITKIOJPEG;general;itktiff;general;ITKIOTIFF;general;ITKIOLSM;general;ITKIOMRC;general;ITKIOMesh;general;ITKIOMeta;general;ITKIONIFTI;general;ITKNrrdIO;general;ITKIONRRD;general;itkpng;general;ITKIOPNG;general;ITKIOSiemens;general;ITKIOStimulate;general;ITKIOTransformBase;general;ITKIOTransformHDF5;general;ITKIOTransformInsightLegacy;general;ITKIOTransformMatlab;general;ITKIOVTK;general;ITKKLMRegionGrowing;general;ITKOptimizersv4;general;ITKVTK;general;ITKVideoCore;general;ITKVideoIO;general;ITKWatersheds;

//Dependencies for the target
kvlGEMSMatlab_LIB_DEPENDS:STATIC=general;/usr/pubsw/common/matlab/8.4/bin/glnxa64/libmex.so;general;itkdouble-conversion;general;itksys;general;itkvnl_algo;general;itkvnl;general;itkv3p_netlib;general;ITKCommon;general;itkNetlibSlatec;general;ITKStatistics;general;ITKTransform;general;ITKLabelMap;general;ITKMesh;general;itkzlib;general;ITKMetaIO;general;ITKSpatialObjects;general;ITKPath;general;ITKQuadEdgeMesh;general;ITKIOImageBase;general;ITKOptimizers;general;ITKPolynomials;general;ITKBiasCorrection;general;ITKBioCell;general;ITKDICOMParser;general;ITKEXPAT;general;gdcmDICT;general;gdcmMSFF;general;ITKIOGDCM;general;ITKznz;general;ITKniftiio;general;ITKDeprecated;general;ITKIOXML;general;ITKIOSpatialObjects;general;ITKFEM;general;ITKgiftiio;general;itkhdf5_cpp;general;itkhdf5;general;ITKIOBMP;general;ITKIOBioRad;general;ITKIOCSV;general;ITKIOIPL;general;ITKIOGE;general;ITKIOGIPL;general;ITKIOHDF5;general;itkjpeg;general;ITKIOJPEG;general;itktiff;general;ITKIOTIFF;general;ITKIOLSM;general;ITKIOMRC;general;ITKIOMesh;general;ITKIOMeta;general;ITKIONIFTI;general;ITKNrrdIO;general;ITKIONRRD;general;itkpng;general;ITKIOPNG;general;ITKIOSiemens;general;ITKIOStimulate;general;ITKIOTransformBase;general;ITKIOTransformHDF5;general;ITKIOTransformInsightLegacy;general;ITKIOTransformMatlab;general;ITKIOVTK;general;ITKKLMRegionGrowing;general;ITKOptimizersv4;general;ITKVTK;general;ITKVideoCore;general;ITKVideoIO;general;ITKWatersheds;general;kvlGEMSCommon;


########################
# INTERNAL cache entries
########################

//MODIFIED property for variable: BUILD_MATLAB
BUILD_MATLAB-MODIFIED:INTERNAL=ON
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//MODIFIED property for variable: CMAKE_BUILD_TYPE
CMAKE_BUILD_TYPE-MODIFIED:INTERNAL=ON
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=12
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//MODIFIED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-MODIFIED:INTERNAL=ON
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//MODIFIED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-MODIFIED:INTERNAL=ON
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2
//MODIFIED property for variable: CMAKE_INSTALL_PREFIX
CMAKE_INSTALL_PREFIX-MODIFIED:INTERNAL=ON
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=3
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/bin/uname
//ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS
CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_64_BIT_DEVICE_CODE
CUDA_64_BIT_DEVICE_CODE-ADVANCED:INTERNAL=1
//List of intermediate files that are part of the cuda dependency
// scanning.
CUDA_ADDITIONAL_CLEAN_FILES:INTERNAL=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2/cuda/CMakeFiles/kvlGEMSCUDA.dir//kvlGEMSCUDA_generated_visitcountersimplecudaimpl.cu.o.depend
//ADVANCED property for variable: CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_BUILD_CUBIN
CUDA_BUILD_CUBIN-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_BUILD_EMULATION
CUDA_BUILD_EMULATION-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_CUDART_LIBRARY
CUDA_CUDART_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_CUDA_LIBRARY
CUDA_CUDA_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_GENERATED_OUTPUT_DIR
CUDA_GENERATED_OUTPUT_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_HOST_COMPILATION_CPP
CUDA_HOST_COMPILATION_CPP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_EXECUTABLE
CUDA_NVCC_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_FLAGS
CUDA_NVCC_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_FLAGS_DEBUG
CUDA_NVCC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_FLAGS_MINSIZEREL
CUDA_NVCC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_FLAGS_RELEASE
CUDA_NVCC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_NVCC_FLAGS_RELWITHDEBINFO
CUDA_NVCC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_PROPAGATE_HOST_FLAGS
CUDA_PROPAGATE_HOST_FLAGS-ADVANCED:INTERNAL=1
//This is the value of the last time CUDA_SDK_ROOT_DIR was set
// successfully.
CUDA_SDK_ROOT_DIR_INTERNAL:INTERNAL=CUDA_SDK_ROOT_DIR-NOTFOUND
//ADVANCED property for variable: CUDA_SEPARABLE_COMPILATION
CUDA_SEPARABLE_COMPILATION-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_TARGET_CPU_ARCH
CUDA_TARGET_CPU_ARCH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_TOOLKIT_INCLUDE
CUDA_TOOLKIT_INCLUDE-ADVANCED:INTERNAL=1
//This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was
// set successfully.
CUDA_TOOLKIT_ROOT_DIR_INTERNAL:INTERNAL=/usr/local/cuda
//ADVANCED property for variable: CUDA_TOOLKIT_TARGET_DIR
CUDA_TOOLKIT_TARGET_DIR-ADVANCED:INTERNAL=1
//This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was
// set successfully.
CUDA_TOOLKIT_TARGET_DIR_INTERNAL:INTERNAL=CUDA_TOOLKIT_ROOT_DIR-NOTFOUND
//ADVANCED property for variable: CUDA_VERBOSE_BUILD
CUDA_VERBOSE_BUILD-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_VERSION
CUDA_VERSION-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublas_LIBRARY
CUDA_cublas_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cublasemu_LIBRARY
CUDA_cublasemu_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cudart_static_LIBRARY
CUDA_cudart_static_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufft_LIBRARY
CUDA_cufft_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cufftemu_LIBRARY
CUDA_cufftemu_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cupti_LIBRARY
CUDA_cupti_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_curand_LIBRARY
CUDA_curand_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusolver_LIBRARY
CUDA_cusolver_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_cusparse_LIBRARY
CUDA_cusparse_LIBRARY-ADVANCED:INTERNAL=1
//Location of make2cmake.cmake
CUDA_make2cmake:INTERNAL=/autofs/cluster/pubsw/2/pubsw/Linux2-2.3-x86_64/packages/cmake/3.5.2/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake
//ADVANCED property for variable: CUDA_nppc_LIBRARY
CUDA_nppc_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_nppi_LIBRARY
CUDA_nppi_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CUDA_npps_LIBRARY
CUDA_npps_LIBRARY-ADVANCED:INTERNAL=1
//Location of parse_cubin.cmake
CUDA_parse_cubin:INTERNAL=/autofs/cluster/pubsw/2/pubsw/Linux2-2.3-x86_64/packages/cmake/3.5.2/share/cmake-3.5/Modules/FindCUDA/parse_cubin.cmake
//Location of run_nvcc.cmake
CUDA_run_nvcc:INTERNAL=/autofs/cluster/pubsw/2/pubsw/Linux2-2.3-x86_64/packages/cmake/3.5.2/share/cmake-3.5/Modules/FindCUDA/run_nvcc.cmake
//Single output directory for building all executables.
EXECUTABLE_OUTPUT_PATH:INTERNAL=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2/bin
//Details about finding CUDA
FIND_PACKAGE_MESSAGE_DETAILS_CUDA:INTERNAL=[/usr/local/cuda][/usr/local/cuda/bin/nvcc][/usr/local/cuda/include][/usr/local/cuda/lib64/libcudart.so][v8.0()]
//Details about finding Matlab
FIND_PACKAGE_MESSAGE_DETAILS_Matlab:INTERNAL=[/usr/pubsw/common/matlab/8.4/extern/include][/usr/pubsw/common/matlab/8.4/bin/glnxa64/libmex.so][mexa64][/usr/pubsw/common/matlab/8.4][c ][v8.6()]
//Test HAS_MINUS_PTHREAD
HAS_MINUS_PTHREAD:INTERNAL=
//MODIFIED property for variable: ITK_DIR
ITK_DIR-MODIFIED:INTERNAL=ON
//Single output directory for building all libraries.
LIBRARY_OUTPUT_PATH:INTERNAL=/space/sand/1/users/zkaufman/git_repos/freesurfer.test/GEMS2/bin
//ADVANCED property for variable: Matlab_INCLUDE_DIRS
Matlab_INCLUDE_DIRS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Matlab_MEX_EXTENSION
Matlab_MEX_EXTENSION-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Matlab_MEX_LIBRARY
Matlab_MEX_LIBRARY-ADVANCED:INTERNAL=1
//internal matlab location for the discovered version
Matlab_PROG_VERSION_STRING_AUTO_DETECT:INTERNAL=/autofs/cluster/pubsw/1/pubsw/common/bin/matlab
//MODIFIED property for variable: Matlab_ROOT_DIR
Matlab_ROOT_DIR-MODIFIED:INTERNAL=ON
//last Matlab root dir location
Matlab_ROOT_DIR_LAST_CACHED:INTERNAL=/usr/pubsw/common/matlab/8.4
//Matlab version (automatically determined)
Matlab_VERSION_STRING_INTERNAL:INTERNAL=8.6

