Hi Michael,
you probably figured this out by now, but for future reference: You have to
log to stderr to make the script fail.
This example works (as in /does not build/ ;) ):
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/skript.cmake"
CONTENT "message(FATAL_ERROR \"Script
-Original Message-
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
Date: Monday, February 26, 2018 at 6:02 PM
To: Michael Jackson <mike.jack...@bluequartz.net>
Cc: CMake Mail List <cmake@cmake.org>
Subject: Re: [CMake] Return an Error Code (or something) from
On 2018-02-26 14:19-0500 Michael Jackson wrote:
In our CMake based project I generate a *.cmake file which I call with the
following bit of code:
add_custom_target(DREAM3D_MKDOCS_GENERATION ALL
COMMAND "${CMAKE_COMMAND}" -P "${docsCmakeFile}"
COMMENT "using mkdocs to generate the
cmake -P usually do the right thing. Here you ignore the error because you
only message (STATUS ...)
Try adding message (ERROR ...) or message (FATAL_ERROR ...) when
execute_process producer error and tout custom command should faim.
Le 26 févr. 2018 20:19, "Michael Jackson"
In our CMake based project I generate a *.cmake file which I call with the
following bit of code:
add_custom_target(DREAM3D_MKDOCS_GENERATION ALL
COMMAND "${CMAKE_COMMAND}" -P "${docsCmakeFile}"
COMMENT "using mkdocs to generate the documentation"
)
Inside the generated file is