From 2ac2c5ec6e3bec25b3e4b641781adcd78d8dd20b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 20 Jul 2018 13:19:16 +0200 Subject: [PATCH] CONFIG: cmake targets are globally unique --- src/catalyst/CMakeLists-Catalyst.txt | 1 + src/catalyst/CMakeLists.txt | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/catalyst/CMakeLists-Catalyst.txt b/src/catalyst/CMakeLists-Catalyst.txt index 00cf60e..453968d 100644 --- a/src/catalyst/CMakeLists-Catalyst.txt +++ b/src/catalyst/CMakeLists-Catalyst.txt @@ -1,4 +1,5 @@ #------------------------------------------------------------------------------ +project(catalyst) include(${PARAVIEW_USE_FILE}) diff --git a/src/catalyst/CMakeLists.txt b/src/catalyst/CMakeLists.txt index cb734ec..7494a11 100644 --- a/src/catalyst/CMakeLists.txt +++ b/src/catalyst/CMakeLists.txt @@ -1,19 +1,13 @@ #------------------------------------------------------------------------------ cmake_minimum_required(VERSION 2.8) +cmake_policy(SET CMP0002 NEW) # Policy CMP0002 required for for cmake >= 3 -# Fail immediately if not using an out-of-source build +# Fail if not building out-of-source if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) message(FATAL_ERROR - "In-source builds are not supported. Please create a build directory " - "separate from the source directory") + "In-source builds disallowed. Use a separate build directory") endif() -project(catalyst) - -# Set policy for CMP0002 needed for cmake > 3 -cmake_policy(SET CMP0002 OLD) - - include(CMakeLists-OpenFOAM.txt) #------------------------------------------------------------------------------ -- GitLab