Code::Blocks

User forums => Help => Topic started by: scorp08 on September 28, 2019, 01:37:36 pm

Title: Help ! - Cmake with CodeBlocks
Post by: scorp08 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: [Select]
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)

Title: Re: Help ! - Cmake with CodeBlocks
Post by: oBFusCATed 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.