summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/project/ProjectTwice.cmake
blob: d053834dc47647937b262ec1ee99d60bd265be18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_policy(SET CMP0048 NEW)
project(ProjectTwiceTestFirst
  VERSION 1.2.3.4
  DESCRIPTION "Test Project"
  HOMEPAGE_URL "http://example.com"
  LANGUAGES NONE
)

project(ProjectTwiceTestSecond LANGUAGES NONE)

foreach(var
  PROJECT_VERSION
  PROJECT_VERSION_MAJOR
  PROJECT_VERSION_MINOR
  PROJECT_VERSION_PATCH
  PROJECT_VERSION_TWEAK
  PROJECT_DESCRIPTION
  PROJECT_HOMEPAGE_URL
)
  if(${var})
    message(SEND_ERROR "${var} set but should be empty")
  endif()
  if(CMAKE_${var})
    message(SEND_ERROR "CMAKE_${var} set but should be empty")
  endif()
endforeach()