2009-08-03 21:37:28 +04:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
project(TryCompileInner C)
|
|
|
|
|
2009-08-03 21:37:36 +04:00
|
|
|
try_compile(SHOULD_PASS
|
|
|
|
${TryCompileInner_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
|
|
|
|
${TryCompileInner_SOURCE_DIR}/../pass.c
|
|
|
|
OUTPUT_VARIABLE TRY_OUT
|
|
|
|
)
|
|
|
|
if(NOT SHOULD_PASS)
|
|
|
|
message(FATAL_ERROR "Inner try-compile SHOULD_PASS failed!")
|
|
|
|
endif()
|
|
|
|
|
2009-08-04 22:37:46 +04:00
|
|
|
add_library(innerlib innerlib.c)
|
|
|
|
add_executable(innerexe innerexe.c)
|
|
|
|
target_link_libraries(innerexe innerlib)
|