For later convenience, please create a symbolic link cmake to this cmake executable, so that cmake can be invoked from the Terminal by simply entering cmake.
įind the path to the CMake executable, which is typically /Applications/CMake.app/Contents/bin/cmake. Make sure that Clang compiler is installed, which is typically the case if you installed Xcode and the associated command line tools. TIP: A ready made IQ-TREE package is provided by * Homebrew by simply running brew install homebrew/science/iqtree2. If you have Clang installed and want to compile with Clang, the compilation will be similar to Mac OS X like below. TIP: The above guide typically compiles IQ-TREE with gcc. It can be copied to your system search path so that IQ-TREE can be called from the Terminal simply with the command line iqtree2. This creates an executable iqtree2 ( iqtree for version 1). Without this option, make uses only one core, which might be slow. J option tells it to use all CPU cores to speed up the compilation. If this still failed, you have to manually specify the downloaded directory of Eigen3 with: cmake -DEIGEN3_INCLUDE_DIR=. If cmake failed with message about Eigen3 not found, then install Eigen3 library and run cmake again. TIP: Ready made IQ-TREE packages are provided for Debian and Arch Linux (AUR).Ĭhange to the source code folder: cd PATH_TO_EXTRACTED_SOURCE_CODEĬreate a subfolder, say, build and go into this subfolder: mkdir buildĬonfigure source code with CMake: cmake. ( Optional) Install git if you want to clone source code from IQ-TREE GitHub repository. Under MacOS you use Homebrew and run brew install libomp to install the OpenMP library. This should typically be the case with gcc under Linux. OpenMP library, which is used to compile the multicore version. If this failed, you have to manually specify -DEIGEN3_INCLUDE_DIR= to the cmake command (see below). By default IQ-TREE will detect the path to the installed Eigen3 library. Under MacOS you use Homebrew and run brew install eigen to install the Boost library. Įigen3 library (for IQ-TREE version >= 1.6). By default IQ-TREE will detect the path to the installed Boost library. Under MacOS you use Homebrew and run brew install boost to install the Boost library.
Boost library is typically available under Linux. A C++ compiler such as GCC (version >= 4.8), Clang, MS Visual Studio and Intel C++ compiler.