From 264e4fd3b1b7f23e68f0206543721ecf0b328b3f Mon Sep 17 00:00:00 2001 From: Christoph Junghans <junghans@lanl.gov> Date: Fri, 22 Jun 2018 17:05:55 -0600 Subject: [PATCH] cmake: fix for <cmake-3.4 --- cmake/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 63008b5060..a434b982e4 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -461,6 +461,9 @@ endforeach(HEADER) set(MATH_LIBRARIES "m" CACHE STRING "math library") mark_as_advanced( MATH_LIBRARIES ) include(CheckLibraryExists) +if (CMAKE_VERSION VERSION_LESS "3.4") + enable_language(C) # check_library_exists isn't support with a c compiler before v3.4 +endif() foreach(FUNC sin cos) check_library_exists(${MATH_LIBRARIES} ${FUNC} "" FOUND_${FUNC}_${MATH_LIBRARIES}) if(NOT FOUND_${FUNC}_${MATH_LIBRARIES}) -- GitLab