Page 1 of 1

[Solved]Does not execute post build event

Posted: Thu Jun 15, 2017 2:05 pm
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. :shock:

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.

Re: Does not execute post build event

Posted: Thu Jun 15, 2017 3:05 pm
by eranif
Can you post the generated CMakeLists.txt file?

Re: Does not execute post build event

Posted: Fri Jun 16, 2017 5:09 am
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})

Re: Does not execute post build event

Posted: Fri Jun 16, 2017 6:22 pm
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

Re: Does not execute post build event

Posted: Mon Jun 19, 2017 12:33 pm
by coot
:D Thanks. Solved. Yes, that is the problem.