summaryrefslogtreecommitdiff
path: root/Tests/OutOfSource/CMakeLists.txt
blob: c82d077a74a35320aaf25c32007eac5ea9d29f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# a simple test case
cmake_minimum_required (VERSION 2.6)
project (OutOfSource)

add_subdirectory(SubDir)

get_directory_property(ANIMAL DIRECTORY OutOfSourceSubdir DEFINITION WEASELS)
get_directory_property(ANIMALREL DIRECTORY SubDir/../OutOfSourceSubdir DEFINITION WEASELS)
if(NOT "${ANIMAL}" STREQUAL "${ANIMALREL}")
  message(FATAL_ERROR "GET_DIRECTORY_PROPERTY does not seem to collapse paths.")
endif()

configure_file(
  ${OutOfSource_SOURCE_DIR}/testdp.h.in
  ${OutOfSource_BINARY_DIR}/SubDir/OutOfSourceSubdir/testdp.h
  )

set(KEN 1)

configure_file(SubInBuildCMakeLists.cmake ${CMAKE_CURRENT_BINARY_DIR}/SubInBuild/CMakeLists.txt COPYONLY)
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/SubInBuild ${CMAKE_CURRENT_BINARY_DIR}/SubInBuild/Build)