

- Mac command for cpp install mac os x#
- Mac command for cpp install install#
- Mac command for cpp install code#
- Mac command for cpp install windows#
Install an MPI library (e.g., OpenMPI) if not available in your system.
Mac command for cpp install code#

To build the multicore version please add -DIQTREE_FLAGS=omp to the cmake command. Ĭonfigure source code with CMake: cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=-target=x86_64-pc-windows-gnu -DCMAKE_CXX_FLAGS=-target=x86_64-pc-windows-gnu -DCMAKE_MAKE_PROGRAM=mingw32-make.
Mac command for cpp install windows#
Please note that Windows uses back-slash ( \) instead of slash ( /) as path name separator. Thus, it is recommended to compile IQ-TREE with Clang. WARNING: Although IQ-TREE can also be built with TDM-GCC, the executable does not run properly due to stack alignment issue and the libgomp library causes downgraded performance for the OpenMP version. Please first install TDM-GCC (a GCC version for Windows) from. (assuming that clang-3.7 and clang++-3.7 points to the installed Clang 3.7). After that you can run CMake with: cmake -DIQTREE_FLAGS=omp -DCMAKE_C_COMPILER=clang-3.7 -DCMAKE_CXX_COMPILER=clang++-3.7. However, the latest Clang 3.7 supports OpenMP, which can be downloaded from. To compile the multicore version, the default installed Clang unfortunately does not support OpenMP (which might change in the near future). (please change cmake to absolute path like /Applications/CMake.app/Contents/bin/cmake). The steps to compile IQ-TREE are similar to Linux (see above), except that you need to specify clang as compiler when configuring source code with CMake (step 4): cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++. 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.
Mac command for cpp install mac os x#
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.

A C++ compiler such as GCC (version >= 4.8), Clang, MS Visual Studio and Intel C++ compiler.
