CMake check for OpenMP

This commit is contained in:
Nicolás A. Ortega 2016-11-30 22:20:46 +01:00
parent 75b35b3356
commit 1593e57e90
No known key found for this signature in database
GPG Key ID: 614272579C2070D1

View File

@ -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")