commit 110a592258024001074d4e11e4bd357ab9fa9546
parent 14d4828ea33c095a3ddededcc43259704c9a95f0
Author: vaplv <vaplv@free.fr>
Date: Wed, 1 Feb 2017 10:40:06 +0100
Update the version of the required CMake to 2.8
Diffstat:
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -13,9 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this CMake script. If not, see <http://www.gnu.org/licenses/>.
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
project(rsys C)
-cmake_policy(SET CMP0011 NEW)
enable_testing()
set(RSYS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src)
@@ -57,7 +56,7 @@ elseif(CMAKE_USE_WIN32_THREADS_INIT)
set(RSYS_FILES_SRC_THREAD
win32/win32_condition.c
win32/win32_mutex.c)
-endif(CMAKE_USE_PTHREADS_INIT)
+endif()
set(RSYS_FILES_INC
io_c99.h)
@@ -144,8 +143,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
target_link_libraries(rsys m)
if(NOT MINGW)
target_link_libraries(rsys dl)
- endif(NOT MINGW)
-endif(CMAKE_COMPILER_IS_GNUCC)
+ endif()
+endif()
################################################################################
# Add tests
@@ -156,13 +155,13 @@ if(NOT NO_TEST)
set(_libraries ${ARGN})
foreach(_lib ${_libraries})
target_link_libraries(${_name} ${_lib})
- endforeach(_lib)
+ endforeach()
add_test(${_name} ${_name})
- endmacro(new_test)
+ endmacro()
if(CMAKE_COMPILER_IS_GNUCC)
set(MATH_LIB m)
- endif(CMAKE_COMPILER_IS_GNUCC)
+ endif()
new_test(test_algorithm)
new_test(test_atomic)
@@ -207,7 +206,7 @@ if(NOT NO_TEST)
if(NOT OPENMP_FOUND)
message(STATUS "No OpenMP support: multi-threaded tests cannot be generated")
- else(NOT OPENMP_FOUND)
+ else()
new_test(test_mutex rsys)
new_test(test_condition rsys)
@@ -217,11 +216,11 @@ if(NOT NO_TEST)
if(CMAKE_COMPILER_IS_GNUCC)
set_target_properties(test_mutex test_condition PROPERTIES
LINK_FLAGS ${OpenMP_C_FLAGS})
- endif(CMAKE_COMPILER_IS_GNUCC)
+ endif()
- endif(NOT OPENMP_FOUND)
+ endif()
-endif(NOT NO_TEST)
+endif()
################################################################################
# Define output & install directories