Author Topic: Help ! - Cmake with CodeBlocks  (Read 3464 times)

scorp08

  • Guest
Help ! - Cmake with CodeBlocks
« on: September 28, 2019, 01:37:36 pm »
Hello All
I was trying to use Cmake which has a very bad tutorial and documentation. Have 2 basic file (mystruct.h and struct_cagir.cpp) both in same folder with CMakeLists.txt (top level). I set Codeblock-mingw make as generator.
No matter what I've tried, Cmake did not create exe because It seems that did not put into account the header file. I tried alot  of different CMakeLists but could not solve the problem. It generates the .cbp but only shows the .cpp file. Why is it happening ?
One is following :

Code
cmake_minimum_required(VERSION 3.1)

project(deneme)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_library(calclib STATIC mystruct.h struct_cagir.cpp)
add_executable(my_exe struct_cagir.cpp)
target_link_libraries(my_exe PUBLIC calclib)


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Help ! - Cmake with CodeBlocks
« Reply #1 on: September 28, 2019, 06:54:01 pm »
We don't support cmake here. You should have to find a cmake support place.

If you want to debug this run "make VERBOSE=1" and see what commands are executed and why they fail to produce an executable.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]