-
Notifications
You must be signed in to change notification settings - Fork 3
Compilation Guide
-
CMake (version >= 3.14).
-
OpenMP library for using multithreading. Under Linux, OpenMP is supported by compilers (such as GCC or Clang), no further installation required. Under MacOS, one can use Homebrew - running
brew install libomp
- to install the OpenMP library.
One can directly download the source code of CMAPLE from a Release.
Alternatively, one can clone the source code from CMAPLE's GitHub repo (if having git installed), with:
git clone --recursive https://github.com/iqtree/cmaple.git
Please find the compilation guide for Linux, Mac OS X, and Windows.
-
Open a Terminal and navigate to your working folder.
cd <PATH_TO_YOUR_WORKING_FOLDER>
-
Create a
build
folder and navigate to that folder:mkdir build cd build
-
Configure source code with
CMake
:cmake <PATH_TO_EXTRACTED_SOURCE_CODE>
To build a static version, please add
-DCMAPLE_FLAGS=static
to the above command.To explicitly specify a compiler, for example,
GCC
, one can add-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
. -
Compile source code with
make
:make
To speedup the compilation, one can use
-j
option to employ all CPU cores available on your machine.
This creates two executables cmaple
and cmaple-aa
, for DNA and protein data, respectively.
The default compiler on Mac OS X is Clang. Make sure you have the OpenMP library installed as instructed at Prerequisites.
The compilation steps are the same as compilation under Linux. Note that at step 3, you don't need to use -DCMAPLE_FLAGS=static
to build a static version.
Not tested yet! Sorry!!!
Under Windows, one may need to install the Build Tools for Visual Studio. which includes CMake and Clang.
-
Install the Ninja-build tool.
-
Open a Command Prompt and navigate to your working folder.
cd <PATH_TO_YOUR_WORKING_FOLDER>
-
Create a
build
folder and navigate to that folder:mkdir build cd build
-
Configure source code with
CMake
andNinja
:cmake -G Ninja <PATH_TO_EXTRACTED_SOURCE_CODE>
To specify Clang compiler, one can add
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
. -
Compile source code with
ninja
:ninja