puzzlepaint / cide

A fast, lightweight C/C++ IDE for Linux and Windows
BSD 3-Clause "New" or "Revised" License
50 stars 12 forks source link

build error with make generator : version.h:10:10: fatal error: 'CIDE_git_version.h' file not found #3

Closed Petross404 closed 4 years ago

Petross404 commented 4 years ago

I forgot to explicity tell CMake which generator to use with -G flag and I got this error with make :

[ 51%] Building CXX object CMakeFiles/CIDEBaseLib.dir/src/cide/code_completion_widget.cc.o
In file included from /Users/petros/cide.git/src/cide/about_dialog.cc:13:
/Users/petros/cide.git/src/cide/version.h:10:10: fatal error: 
      'CIDE_git_version.h' file not found
#include "CIDE_git_version.h"
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/CIDEBaseLib.dir/src/cide/about_dialog.cc.o] Error 1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5a8832..f19bb3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -210,3 +210,7 @@ target_link_libraries(CIDETest
 add_test(CIDETest
   CIDETest
 )
+
+if(NOT ${CMAKE_MAKE_PROGRAM} MATCHES "ninja")
+   message(WARNING "Not using Ninja Generators may lead to build failure")
+endif()

For such a small change I didn't bother to fork and create a PR, but let me know if otherwise it's trouble for you.

puzzlepaint commented 4 years ago

Thank you, I added this in commit 113c90ffa589c0576733fb5f50f47292b4505d8a.