Symbex can be build with CMake on Linux Ubuntu or Windows MSYS2 systems Follow steps described in INSTALL_MSYS2.md
or INSTALL_LINUX.md
to install the required environment.
CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
CMake holds the build rules in configuration files (src/CMakeLists.txt
, src/*/CMakeLists.txt
and src/cmake/*.cmake
) written in a dedicated platform independent language.
Basically, building with CMake follows this procedure :
If one or several sources file are modified, it is only required to redo the build step. If compile options or prerequisites are modified, the whole procedure must be done again from the beginning.
CMake can launched through a GUI or a command line.
After boost is installed, copy the boost default installation to a directory where CVC4 configure will be able to find it :cp -R /mingw64 /mingw642
git clone ssh://gitolite@132.166.135.212/diversity/org.eclipse.efm-symbex.git
. Make sure your SSH keys exists and are properly declared to Git.cmake-gui &
and fill the two top fields with the path to the workspace sources directory (it should be src
) and the directory where you want to build (it is better to choose one outside the workspace).make
. On multicore platform you can launch parallel build with make -jX
where X is slightly inferior to the number of cores. The current platform core number is displayed in the CMake message console. Build verbosity can be increased with make VERBOSE=1
. If it is the very first build, CMake will try to download, build and install the missing prerequisites (longer build).symbex.exe
executable is built and can be checked using ./symbex -test
.Follow steps 2 to 7 of Build on Windows MSYS2 procedure. During step 4, choose the Unix Makefiles generator During step 6, if it is the very first build, Cmake will install the missing prerequisites, but will not have access to the default folders. Either try sudo make
or install in other folders. It is possible to configure installation in other folders in SpecificOptions-LinuxNAtive.cmake
Options that affect the whole project on every platform Edit GenericOptions.cmake
and modify add_definitions()
and add_options()
commands according to your wish. Pay attention to only put platform independent options here. Exemple : -g
, -O3
, -D_AVM_BUILTIN_NUMERIC_GMP_
Options that affect the whole project on a specific platform Edit SpecificOptions-<platform>.cmake
and modify add_definitions()
and add_options()
commands according to your wish.
Exemple : -D__AVM_MINGW__
Options that affect a specific internal library on every platform Edit the CMakeLists.txt
file of this library and modify (or add) the add_definitions()
and add_options()
commands according to your wish.
Note : No mechanism is provided to set an option that is specific to only one internal library and only one platform.
How to add a new source file ?
CMake will automatically detect the file as long as it is located in the directory hierarchy of an existing internal library and have a known suffix (.h, .cpp, .c
).
How to add a new sources directory without defining a new internal library
CMake will automatically detect the directory and files it contains as long as it is located in the directory hierarchy of an existing internal library.
How to add a new internal library ?
src/
, create the top directory for mylib and any other required subdirectories.DefineProject.cmake
2.1 Add the required add_subdirectory (mylib)
command. 2.2 Add mylib in the target_link_libraries (symbex ... mylib ...)
command, at the right place for the link to succeed.CMakeLists.txt
file of an existing internal library into the top directory of mylib. Change all occurences of the existent library name with mylib. If needed, add or remove target_include_directories()
commands to give access to any needed prerequisiste headers. Never write an explicit path here, instead use CMake variable (you can look at the CMakeLists.txt of other library to know about the right variable).FindX.cmake module
, taking inspiration from an existing one. This module should return CMake variables containing path to the library(ies) and the include directory(ies).LookForMandatoryPrereq.cmake
for CMake to call the new FindX
module.target_link_libraries(symbex ...)
command in DefineProject.cmake
target_include_directories
command in the CMalkeLists.txt
of this library. Always use CMake variables created by the FindX module (cf. step 1).