1 # a simple C only test case
2 cmake_minimum_required (VERSION 2.6)
5 set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
6 add_library(testc1 STATIC libc1.c)
7 add_library(testc2 SHARED libc2.c)
8 add_executable (COnly conly.c foo.c foo.h)
9 target_link_libraries(COnly testc1 testc2)
11 set_target_properties(COnly PROPERTIES
12 LINK_FLAGS " /NODEFAULTLIB:\"libcdg.lib\" /NODEFAULTLIB:\"libcmtg.lib\" /NODEFAULTLIB:\"foomsvcrt.lib\" /NODEFAULTLIB:\"libbar.lib\" /NODEFAULTLIB:\"libfooba.lib\"")
14 string(ASCII 35 32 67 77 97 107 101 ASCII_STRING)
15 message(STATUS "String: ${ASCII_STRING}")
16 get_source_file_property(LANG conly.c LANGUAGE)
17 if("${LANG}" STREQUAL "C")
18 message("Language is C")
19 else("${LANG}" STREQUAL "C")
20 message(FATAL_ERROR "Bad language for file conly.c")
21 endif("${LANG}" STREQUAL "C")