set( PROJ_NAME Test01 )
file( GLOB ${PROJ_NAME}_SRC *.h *.cpp )
add_executable( ${PROJ_NAME} ${${PROJ_NAME}_SRC} )
On Thu, Jan 22, 2015 at 1:05 AM, Eric Noulard wrote:
>
>
> 2015-01-22 3:41 GMT+01:00 Joshua Robinson :
>>
>>
>> Greetings,
>>
>> Can I add a variable, was set before, to add_executa
2015-01-22 3:41 GMT+01:00 Joshua Robinson :
>
> Greetings,
>
> Can I add a variable, was set before, to add_executable ?
>
I guess yes. However if "PROJ_NAME" value was used in
project(Test01 C CXX)
then there may be a conflict between "project name" and a "target name"
>
> set(PROJ_NAME Test0
Greetings,
Can I add a variable, was set before, to add_executable ?
set(PROJ_NAME Test01)
,,,
file( GLOB ${PROJ_NAME}_SRC "*.h" "*.cpp" )
add_executable( ${PROJ_NAME} ${PROJ_NAME}_SRC)
...
error in add_executable(..)
Any help is appreciated.
Best Regards,
Joshua Robinson
--
Powered by www.