Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/runtime/test/CMakeLists.txt
# CMakeLists.txt file for unit testing OpenMP Library | # CMakeLists.txt file for unit testing OpenMP Library | ||||
include(FindPythonInterp) | include(FindPythonInterp) | ||||
include(CheckTypeSize) | include(CheckTypeSize) | ||||
include(CheckLibraryExists) | |||||
if(NOT PYTHONINTERP_FOUND) | if(NOT PYTHONINTERP_FOUND) | ||||
libomp_warning_say("Could not find Python.") | libomp_warning_say("Could not find Python.") | ||||
libomp_warning_say("The check-libomp target will not be available!") | libomp_warning_say("The check-libomp target will not be available!") | ||||
return() | return() | ||||
endif() | endif() | ||||
# Some tests use math functions | |||||
check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM) | |||||
macro(pythonize_bool var) | macro(pythonize_bool var) | ||||
if (${var}) | if (${var}) | ||||
set(${var} True) | set(${var} True) | ||||
else() | else() | ||||
set(${var} False) | set(${var} False) | ||||
endif() | endif() | ||||
endmacro() | endmacro() | ||||
pythonize_bool(LIBOMP_USE_HWLOC) | pythonize_bool(LIBOMP_USE_HWLOC) | ||||
pythonize_bool(LIBOMP_OMPT_SUPPORT) | pythonize_bool(LIBOMP_OMPT_SUPPORT) | ||||
pythonize_bool(LIBOMP_OMPT_BLAME) | pythonize_bool(LIBOMP_OMPT_BLAME) | ||||
pythonize_bool(LIBOMP_OMPT_TRACE) | pythonize_bool(LIBOMP_OMPT_TRACE) | ||||
pythonize_bool(LIBOMP_HAVE_LIBM) | |||||
set(LIBOMP_TEST_CFLAGS "" CACHE STRING | set(LIBOMP_TEST_CFLAGS "" CACHE STRING | ||||
"Extra compiler flags to send to the test compiler") | "Extra compiler flags to send to the test compiler") | ||||
if(${LIBOMP_STANDALONE_BUILD}) | if(${LIBOMP_STANDALONE_BUILD}) | ||||
# Make sure we can use the console pool for recent cmake and ninja > 1.5 | # Make sure we can use the console pool for recent cmake and ninja > 1.5 | ||||
if(CMAKE_VERSION VERSION_LESS 3.1.20141117) | if(CMAKE_VERSION VERSION_LESS 3.1.20141117) | ||||
set(cmake_3_2_USES_TERMINAL) | set(cmake_3_2_USES_TERMINAL) | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |