Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 20 characters in body
Source Link
End Antisemitic Hate
  • 8.4k
  • 34
  • 85
  • 137

It's all in the question. When cmakecmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (ege.g. on Linux the generation of the Makefiles).

Here is an example (this is not my real project, this is specifically designed to generate errors). My file CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)

And when i run cmake . I get the output :

CMake Error at CMakeLists.txt:3 (set_property):
  set_property could not find TARGET foo.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:4 (set_property):
  set_property could not find TARGET bar.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!

What I would like to know is if cmakecmake has the possibility to stop just after the first reported error.

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

Here is an example (this is not my real project, this is specifically designed to generate errors). My file CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)

And when i run cmake . I get the output :

CMake Error at CMakeLists.txt:3 (set_property):
  set_property could not find TARGET foo.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:4 (set_property):
  set_property could not find TARGET bar.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!

What I would like to know is if cmake has the possibility to stop just after the first reported error.

When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (e.g. on Linux the generation of the Makefiles).

Here is an example (this is not my real project, this is specifically designed to generate errors). My file CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)

And when i run cmake . I get the output :

CMake Error at CMakeLists.txt:3 (set_property):
  set_property could not find TARGET foo.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:4 (set_property):
  set_property could not find TARGET bar.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!

What I would like to know is if cmake has the possibility to stop just after the first reported error.

Bumped by Community user
Question Protected by CommunityBot
Bumped by Community user
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Tweeted twitter.com/super_user/status/1292792845137518592
Notice added Draw attention by Sandburg
Bounty Started worth 50 reputation by Sandburg
added 764 characters in body
Source Link
louisiuol
  • 381
  • 1
  • 3
  • 6

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

Here is an example (this is not my real project, this is specifically designed to generate errors). My file CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)

And when i run cmake . I get the output :

CMake Error at CMakeLists.txt:3 (set_property):
  set_property could not find TARGET foo.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:4 (set_property):
  set_property could not find TARGET bar.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!

What I would like to know is if cmake has the possibility to stop just after the first reported error.

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

Here is an example (this is not my real project, this is specifically designed to generate errors). My file CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)

And when i run cmake . I get the output :

CMake Error at CMakeLists.txt:3 (set_property):
  set_property could not find TARGET foo.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:4 (set_property):
  set_property could not find TARGET bar.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!

What I would like to know is if cmake has the possibility to stop just after the first reported error.

added 144 characters in body
Source Link
louisiuol
  • 381
  • 1
  • 3
  • 6

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

It's all in the question. When cmake encounters an error, sometimes it does not stop instantly but continues to process all CMake files. It is only at the end of the treatment that we learn that there is an error, so we have to go back up the whole log to see where it is located.

Is there any option, variable or means to stop CMake just after the first error?

Clarification: I'm not trying to stop the compilation of source code but the CMake generation (eg on Linux the generation of the Makefiles).

Source Link
louisiuol
  • 381
  • 1
  • 3
  • 6
Loading