Tyler Roscoe schrieb:
On Wed, Feb 10, 2010 at 09:08:50PM +0100, Olaf Peter wrote:
How can I add an extra lint/syntax check target for my executable, like:
check-syntax:
c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES}
.PHONY: check-syntax
You'll want to look at
OK, now I have it:
add_custom_target (syntax-check
COMMAND $(CXX) $(CXXFLAGS) -Wall -Wextra -pedantic -fsyntax-only
$(CHECK_SRC) VERBATIM)
But how can I get there the Defines and Includes from regular target
compile?
Thanks,
Olaf
___
Powered by
Load them from the target using the target properties:
get_directory_property(_include_dirs INCLUDE_DIRECTORIES)
set(_includeflags)
foreach(_dir ${_include_dirs})
list(APPEND _args ${YOURTOOL_INCLUDEPATH_ARG}${_dir})
endforeach()
get_target_property(_sources ${_targetname} SOURCES)
How can I add an extra lint/syntax check target for my executable, like:
check-syntax:
c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES}
.PHONY: check-syntax
to make created Makefile??
thanks,
Olaf
___
Powered by
On Wed, Feb 10, 2010 at 09:08:50PM +0100, Olaf Peter wrote:
How can I add an extra lint/syntax check target for my executable, like:
check-syntax:
c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES}
.PHONY: check-syntax
You'll want to look at add_custom_command() and