Commit f5147b7e authored by Kohei Yoshida's avatar Kohei Yoshida

Get Windows build to work again.

parent 31e2af7c
Pipeline #43350182 passed with stage
in 4 minutes and 5 seconds
......@@ -2,44 +2,60 @@ cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0048 NEW)
set(IXION_MAJOR_VERSION 0)
set(IXION_MINOR_VERSION 13)
set(IXION_MICRO_VERSION 0)
set(IXION_MINOR_VERSION 14)
set(IXION_MICRO_VERSION 99)
set(IXION_MAJOR_API_VERSION 0)
set(IXION_MINOR_API_VERSION 15)
set(IXION_VERSION ${IXION_MAJOR_VERSION}.${IXION_MINOR_VERSION}.${IXION_MICRO_VERSION})
project(ixion VERSION ${IXION_VERSION} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(Boost_USE_STATIC_LIBS 1)
find_package(Boost COMPONENTS program_options filesystem)
find_package(Threads)
find_package(Python3)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4275 /MP")
endif(MSVC)
option(MDDS_INCLUDE_DIR "path to mdds header directory.")
option(BOOST_INCLUDE_DIR "path to boost header directory.")
option(BOOST_LIB_DIR "path to boost library directory.")
option(MDDS_INCLUDEDIR "path to mdds header directory.")
option(SPDLOG_INCLUDEDIR "path to spdlog header directory.")
add_definitions(-DIXION_THREADS=1)
add_definitions(
-DIXION_THREADS=1
${Boost_LIB_DIAGNOSTIC_DEFINITIONS}
)
include_directories(
${PROJECT_SOURCE_DIR}/include
${BOOST_INCLUDE_DIR}
${MDDS_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/include
${Boost_INCLUDE_DIR}
${MDDS_INCLUDEDIR}
${SPDLOG_INCLUDEDIR}
)
link_directories(${BOOST_LIB_DIR})
link_directories(${Boost_LIBRARY_DIRS})
set(LIBIXION_SRC_DIR ${PROJECT_SOURCE_DIR}/src/libixion)
add_library(libixion SHARED
${LIBIXION_SRC_DIR}/address.cpp
${LIBIXION_SRC_DIR}/address_iterator.cpp
${LIBIXION_SRC_DIR}/calc_status.cpp
${LIBIXION_SRC_DIR}/cell.cpp
${LIBIXION_SRC_DIR}/cell_queue_manager.cpp
${LIBIXION_SRC_DIR}/compute_engine.cpp
${LIBIXION_SRC_DIR}/compute_engine_cuda.cpp
${LIBIXION_SRC_DIR}/concrete_formula_tokens.cpp
${LIBIXION_SRC_DIR}/config.cpp
${LIBIXION_SRC_DIR}/depends_tracker.cpp
${LIBIXION_SRC_DIR}/dirty_cell_tracker.cpp
${LIBIXION_SRC_DIR}/exceptions.cpp
${LIBIXION_SRC_DIR}/formula.cpp
${LIBIXION_SRC_DIR}/formula_function_opcode.cpp
${LIBIXION_SRC_DIR}/formula_calc.cpp
${LIBIXION_SRC_DIR}/formula_functions.cpp
${LIBIXION_SRC_DIR}/formula_function_opcode.cpp
${LIBIXION_SRC_DIR}/formula_interpreter.cpp
${LIBIXION_SRC_DIR}/formula_lexer.cpp
${LIBIXION_SRC_DIR}/formula_name_resolver.cpp
......@@ -47,14 +63,17 @@ add_library(libixion SHARED
${LIBIXION_SRC_DIR}/formula_result.cpp
${LIBIXION_SRC_DIR}/formula_tokens.cpp
${LIBIXION_SRC_DIR}/formula_value_stack.cpp
${LIBIXION_SRC_DIR}/function_objects.cpp
${LIBIXION_SRC_DIR}/global.cpp
${LIBIXION_SRC_DIR}/grouped_ranges.cpp
${LIBIXION_SRC_DIR}/info.cpp
${LIBIXION_SRC_DIR}/interface.cpp
${LIBIXION_SRC_DIR}/lexer_tokens.cpp
${LIBIXION_SRC_DIR}/matrix.cpp
${LIBIXION_SRC_DIR}/mem_str_buf.cpp
${LIBIXION_SRC_DIR}/model_context.cpp
${LIBIXION_SRC_DIR}/model_iterator.cpp
${LIBIXION_SRC_DIR}/module.cpp
${LIBIXION_SRC_DIR}/queue_entry.cpp
${LIBIXION_SRC_DIR}/table.cpp
${LIBIXION_SRC_DIR}/types.cpp
${LIBIXION_SRC_DIR}/workbook.cpp
......@@ -78,11 +97,13 @@ add_executable(ixion-formula-tokenizer
add_custom_target(
py_gen_files
COMMAND python ${PROJECT_SOURCE_DIR}/bin/gen-files.py
COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/bin/gen-files.py
--properties
IXION_MAJOR_VERSION=${IXION_MAJOR_VERSION}
IXION_MINOR_VERSION=${IXION_MINOR_VERSION}
IXION_MICRO_VERSION=${IXION_MICRO_VERSION}
IXION_MAJOR_API_VERSION=${IXION_MAJOR_API_VERSION}
IXION_MINOR_API_VERSION=${IXION_MINOR_API_VERSION}
--files
${LIBIXION_SRC_DIR}/constants.inl
)
......
......@@ -5,35 +5,58 @@
First, open your MINGW64 shell. You can simply use the MINGW64 shell that
comes shipped with the Windows version of Git. Once you are in it, change
directory to the root of the boost library directory, and run the following
directory to the root of the Boost library directory, and run the following
command:
```bash
./bootstrap.bat
mkdir -p stage/x64
./b2 --stagedir=./stage/x64 address-model=64 --build-type=complete -j 8
./b2 --stagedir=./stage/x64 address-model=64 link=static --build-type=complete -j 8
```
where you may change the part `-j 8` which controls how many concurrent
processes to use for the build.
in order to build Boost as static libraries. You may want to change the part
`-j 8` which controls the number of concurrent processes to use for your build.
Note that **you must build Boost as static libraries** in order to build Ixion
on Windows.
## Clone spdlog and mdds
As ixion uses [spdlog](https://github.com/gabime/spdlog) as its logging facility,
you need to clone its repository before building ixion.
Likewise, you also need to clone [mdds](https://gitlab.com/mdds/mdds). As both
mdds and spdlog are header-only libraries, you don't need to go through any
build process for these libraries. Just make note of their respective header
directory locations.
## Using CMake to build ixion
While at the root of the source directory, run the following commands:
Run the following series of commands to configure your build.
```bash
cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild \
-DBOOST_INCLUDE_DIR="/path/to/boost" \
-DBOOST_LIB_DIR="/path/to/boost/lib" \
-DMDDS_INCLUDE_DIR="/path/to/mdds/include"
cmake --build build
mkdir build
cd build
cmake .. -G "Visual Studio 15 Win64" \
-DBOOST_INCLUDEDIR="/path/to/boost" \
-DBOOST_LIBRARYDIR="/path/to/boost/stage/x64/lib" \
-DMDDS_INCLUDEDIR="/path/to/mdds/include" \
-DSPDLOG_INCLUDEDIR="/path/to/spdlog/include"
```
This will create a `build` directory along with a whole bunch of build-related
files. The final executables are found in `build/Debug`.
Once the configuration is finished, start the build by running:
```bash
cmake --build . --config Release
```
You may choose a different generator name than what is shown in the above
example.
example to suit your need.
The ixion build process also requires Python 3 interpreter. In case you have
trouble getting python3 detected, try specifying the path to your Python 3
installation via `Python3_ROOT_DIR` option.
# Linux
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment