summaryrefslogtreecommitdiff
path: root/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt')
-rw-r--r--Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt38
1 files changed, 19 insertions, 19 deletions
diff --git a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
index 7c969d3..7656577 100644
--- a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
@@ -7,24 +7,24 @@
# If you change this test do not forget to change the CheckCXXSymbolExists
# test, too.
-PROJECT(CheckSymbolExists C)
+project(CheckSymbolExists C)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}")
+set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}")
-INCLUDE(CheckSymbolExists)
+include(CheckSymbolExists)
foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type})
unset(CSE_RESULT_${_config_type} CACHE)
- MESSAGE(STATUS "Testing configuration ${_config_type}")
+ message(STATUS "Testing configuration ${_config_type}")
check_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_${_config_type})
- IF (CSE_RESULT_${_config_type})
- MESSAGE(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}")
- ENDIF (CSE_RESULT_${_config_type})
+ if (CSE_RESULT_${_config_type})
+ message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}")
+ endif ()
endforeach()
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
@@ -32,20 +32,20 @@ unset(CSE_RESULT_ERRNO CACHE)
check_symbol_exists(errno "errno.h" CSE_RESULT_ERRNO)
-IF (NOT CSE_RESULT_ERRNO)
- MESSAGE(SEND_ERROR "CheckSymbolExists did not find errno in <errno.h>")
-ELSE (NOT CSE_RESULT_ERRNO)
- MESSAGE(STATUS "errno found as expected")
-ENDIF (NOT CSE_RESULT_ERRNO)
+if (NOT CSE_RESULT_ERRNO)
+ message(SEND_ERROR "CheckSymbolExists did not find errno in <errno.h>")
+else ()
+ message(STATUS "errno found as expected")
+endif ()
-IF (CMAKE_COMPILER_IS_GNUCC)
+if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
unset(CSE_RESULT_O3 CACHE)
- MESSAGE(STATUS "Testing with optimization -O3")
+ message(STATUS "Testing with optimization -O3")
check_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_O3)
- IF (CSE_RESULT_O3)
- MESSAGE(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing with optimization -O3")
- ENDIF (CSE_RESULT_O3)
-ENDIF (CMAKE_COMPILER_IS_GNUCC)
+ if (CSE_RESULT_O3)
+ message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing with optimization -O3")
+ endif ()
+endif ()