diff --git a/CMakeLists.txt b/CMakeLists.txt index 683c0b3..ac15399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 2.8) project(multirow) -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") find_package(CPLEX REQUIRED) include_directories(${CPLEX_INCLUDE_DIR}) @@ -12,6 +8,10 @@ include_directories(${CPLEX_INCLUDE_DIR}) find_package(GMP REQUIRED) find_package(OpenMP REQUIRED) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror ${OpenMP_CXX_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Werror ${OpenMP_C_FLAGS}") + include_directories(${gtest_SOURCE_DIR}/include) include_directories(infinity/library/include) include_directories(lifting/library/include) diff --git a/onerow/benchmark/CMakeLists.txt b/onerow/benchmark/CMakeLists.txt index 2405d69..2b7cc7e 100644 --- a/onerow/benchmark/CMakeLists.txt +++ b/onerow/benchmark/CMakeLists.txt @@ -1,2 +1,9 @@ add_executable(onerow-benchmark.run src/main.cpp) -target_link_libraries (onerow-benchmark.run LINK_PUBLIC qxx_static onerow_static m pthread ${GMP_LIBRARIES} ${CPLEX_LIBRARIES}) +target_link_libraries (onerow-benchmark.run LINK_PUBLIC + qxx_static + onerow_static + m + pthread + ${GMP_LIBRARIES} + ${CPLEX_LIBRARIES} + ${OpenMP_LIBRARIES}) diff --git a/onerow/benchmark/src/main.cpp b/onerow/benchmark/src/main.cpp index 351ab97..f36374e 100644 --- a/onerow/benchmark/src/main.cpp +++ b/onerow/benchmark/src/main.cpp @@ -98,6 +98,8 @@ int main(int argc, char **argv) Stats::set_input_filename(string(input_filename)); + time_printf("Using OpenMP (%d threads)\n", omp_get_max_threads()); + // reads input file time_printf("Reading input file: %s...\n", input_filename); status = CPXreadcopyprob(env, lp, input_filename, NULL);