General questions regarding the usage of CodeLite
-
coot
- CodeLite Enthusiast
- Posts: 20
- Joined: Thu Jun 15, 2017 1:41 pm
- Genuine User: Yes
- IDE Question: c++
-
Contact:
Post
by coot »
win10 + codelite 10.0.0.4
Makefile Generator:Cmake
Compiler: Mingw64
After build/rebuild, it only ended as following info. no such "Execute post build command xxxx" at all.
Code: Select all
C:\Windows\system32\cmd.exe /C cd D:\Projects\code\cmake-build-Debug\Test && D:/Tools/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/mingw32-make.exe -j8 SHELL=cmd.exe -e
[100%] Built target Test
====0 errors, 0 warnings====
in Pre/Post Build Commands-->Post Build: cp *.exe ../../../../bin
Is there any wrong with the configuration of project?
Thanks.
Last edited by
coot on Mon Jun 19, 2017 1:44 pm, edited 1 time in total.
-
eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
-
Contact:
Post
by eranif »
Can you post the generated CMakeLists.txt file?
-
coot
- CodeLite Enthusiast
- Posts: 20
- Joined: Thu Jun 15, 2017 1:41 pm
- Genuine User: Yes
- IDE Question: c++
-
Contact:
Post
by coot »
CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 2.8)
PROJECT(Test)
# all include diretory
include_directories(
./
../../../ThirdParty/gtest/include
../../../bin
)
# all source file
file(GLOB sources "*.cpp")
set(CMAKE_CXX_FLAGS "-std=c++14 -include stdafx.h -g -Wno-deprecated -ftemplate-backtrace-limit=0")
# output directory
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/)
LINK_DIRECTORIES(
../../../bin
../../../ThirdParty/gtest/lib
)
# build shared library
ADD_EXECUTABLE(Test ${sources})
#link library
set (depend ${CMAKE_CURRENT_SOURCE_DIR}/../../../ThirdParty/gtest/lib/libgtest.a)
target_link_libraries(Test ${depend})
-
eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
-
Contact:
Post
by eranif »
Did you modify this CMakeLists.txt file by hand?
All generated CMakeLists.txt files by CodeLite should contain these line at the top:
Code: Select all
# -*- CMakeLists.txt generated by CodeLite IDE. Do not edit by hand -*-
If this line does not exist, CodeLite will not overwrite your CMakeLists.txt file - so it won't add the post build to the CMakeLists.txt
Delete this file and run-cmake again from within CodeLite
Read this for more info about CodeLite + CMake:
http://codelite.org/LiteEditor/TheCMakePlugin
-
coot
- CodeLite Enthusiast
- Posts: 20
- Joined: Thu Jun 15, 2017 1:41 pm
- Genuine User: Yes
- IDE Question: c++
-
Contact:
Post
by coot »
Thanks. Solved. Yes, that is the problem.