diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b013d4..32c73f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,20 @@ cmake_minimum_required(VERSION 2.6) project(Indivisible) +cmake_policy(SET CMP0012 OLD) + set(TARGET_NAME indivisible) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() +find_package(OpenMP REQUIRED) + set(SRCS src/Main.cpp) -set(CMAKE_CXX_FLAGS "-std=c++14 -fopenmp -fno-elide-constructors -pedantic-errors -Wall -Wextra -Werror -Wpedantic -Winit-self -Wmissing-declarations -Wuninitialized -Wfatal-errors") +set(CMAKE_CXX_FLAGS "-std=c++14 ${OpenMP_CXX_FLAGS} -fno-elide-constructors -pedantic-errors -Wall -Wextra -Werror -Wpedantic -Winit-self -Wmissing-declarations -Wuninitialized -Wfatal-errors") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -O0") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -g -O3")