Created
May 23, 2021 08:41
-
-
Save meysampg/583b421b39bf324a6ec26f9b8af2a415 to your computer and use it in GitHub Desktop.
CMakeLists file for using OpenMP inside of a C++ project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.19) | |
project(jacobi_method) | |
set(CMAKE_CXX_STANDARD 14) | |
find_package(OpenMP) | |
if (OPENMP_FOUND) | |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") | |
endif () | |
add_executable(jacobi_method main.cpp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment