-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
36 lines (28 loc) · 893 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.14)
# set the project name
project(openmp-target LANGUAGES NONE)
OPTION(ENABLE_CXX "Enable/disable C++ tests" ON)
OPTION(ENABLE_Fortran "Enable/disable Fortran tests" ON)
OPTION(ENABLE_EXPERIMENTAL "Enable/disable experimental tests" OFF)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if (ENABLE_CXX)
enable_language(CXX)
# requires C++14 standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(cmake/TestCXXOpenMPRuntime.cmake)
endif()
if (ENABLE_Fortran)
enable_language(Fortran)
include(cmake/FortranHelpers.cmake)
include(cmake/TestFortranOpenMPRuntime.cmake)
endif()
enable_testing()
if (CMAKE_CXX_COMPILER_ID MATCHES "PGI" OR CMAKE_CXX_COMPILER_ID MATCHES "NVHPC")
add_definitions(-D__NO_UDR)
endif()
add_subdirectory(hands-on)
add_subdirectory(tests)