mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
4b47c4d0cd
Do not duplicate the `CMakeFiles/CMakeTmp` portion of the path. The `try_compile` command adds that automatically.
16 lines
405 B
CMake
16 lines
405 B
CMake
cmake_minimum_required(VERSION 2.8.12)
|
|
project(TryCompileInner C)
|
|
|
|
try_compile(SHOULD_PASS
|
|
${TryCompileInner_BINARY_DIR}
|
|
${TryCompileInner_SOURCE_DIR}/../pass.c
|
|
OUTPUT_VARIABLE TRY_OUT
|
|
)
|
|
if(NOT SHOULD_PASS)
|
|
message(FATAL_ERROR "Inner try-compile SHOULD_PASS failed!")
|
|
endif()
|
|
|
|
add_library(innerlib innerlib.c)
|
|
add_executable(innerexe innerexe.c)
|
|
target_link_libraries(innerexe innerlib)
|